Division Game
CodeChefOpen on judge ↗
Avnish and Bishal are playing a special game. They are given n objects and their values. In each of their turn they are picking an object and keeping it. Both are playing optimally so that they can win. Avnish has the first turn. They will pick the elements and in the end they'll find out the total value of the object each of them has collected individually. Now if the absolute difference between
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