Large Head-on Collider
CodeChefOpen on judge ↗
The contestants at Decoherence, the physics event of Pravega, are conducting an experiment. They place $M$ balls of mass $1$ kg and $N$ balls of mass $2$ kg on the x-axis so that the distances between two consecutive balls on the line are all equal, all the $1$ kg mass balls are on the right side of the origin and the $2$ kg mass balls are on the left side of the origin. Assume the balls all have
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