Pair of Robots
CodeChefOpen on judge ↗
Vaseegaran introduced his robots to the Indian army. Every robot $i$ has an attack rating of $Ai$ and a defence rating of $Di$. But the problem with the robots is that they can fight in pair only. If a robot $i$ cannot find a pair it will just start taking rest. But they can pair up with a robot for only one day. A robot $i$ cannot pair with robot $j$ if they are previously paired. So Vasee likes
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