Balls
CodeChefOpen on judge ↗
There are $n$ balls ($n$ is **even**) in the box. Each ball has a positive integer written on it. $n / 2$ people will play new ball game. At the beginning of the game each player gets two balls, each ball is given to exactly one player. Find the way to distribute balls such that the sum of values written on the balls will be equal for each player. It is guaranteed that it is always possib
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