TWO SOLAR SYSTEMS
CodeChefOpen on judge ↗
Chefu has discovered $N$ planets and he wants to make two different solar systems, so he will keep half of the planets in the first solar system and another half in the second solar system. The mass of the first planet is $1$, the second planet is $2$ and so on… Chefu wants that the difference between the masses of the two solar systems should be minimum. Can you help him to find the minimum diffe
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