← All problemsSign in

Reaper Reaps

CodeChefRating 3201Open on judge ↗

*I have no compassion, I only exist to collect the souls of the living.* On Halloween, Grim Reaper wants to reap souls from houses. There are $N$ houses. The $i$-th of them has a *safety level* of $A_i$ and has $B_i$ people living in it. The Reaper has an ability level, denoted $L$. Initially, $L = 0$. When the Reaper visits a house, the following two things happen in order: - If $L \geq A_i

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start