Lazy Rescue
There are $N$ houses in a lane. There is a bomb planted in each house. Bomb placed in the $i^{th}$ house will normally blast at time $A_i$. At a given time $T$, bomb in the $i^{th}$ house will blast if the bomb has not already blasted, and, either one of the following is satisfied: - $A_i = T$; - Bomb in house $i-1$ blasts at time $T$ and $A_i = A_{i-1}+1$; - Bomb in house $i+1$ blasts at time
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