Pairs
CodeChefOpen on judge ↗
The chef knows very well that in maximum cases a * b >= a+b but not in every case so he wonders how many different pairs he can make from n given numbers such that ai * aj < ai+aj. As the chef is not good in mathematics so he asked you to help him to find the number of pairs he can make. Input Format: First line contains t the number of test cases For each test case, you are given one
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start