Thanos reaches Earth
CodeChefOpen on judge ↗
Thanos, in his mission to restore the ecological balance in the universe, has reached planet earth. He considers a planet ecologically balanced if more than half of the people on the planet have the same Consumption Capacity. There are $N$ people on planet earth, each having Consumption Capacity $C_1$, $C_2$, ..., $C_N$ and Strength $S_1$, $S_2$, ..., $S_N$. Thanos will make earth ecological ba
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