Economic Inequality
CodeChefOpen on judge ↗
Many years ago Noobland was a small country where only n people lived. Each person had some savings: the $i$-th one had $a_i$ dollars. The government considered a person as wealthy if he had at least $x$ dollars. To increase the number of wealthy people Noobland decided to carry out several reforms. Each reform looked like that: the government chooses some subset of people (maybe all of them);
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