Bomb the base
In Chefland, there are $N$ houses numbered from $1$ to $N$, $i^{th}$ house has a defence system having strength $A_i$. Chef suspects a bomb drop on **one** of the houses very soon. A bomb with attack strength $X$ can destroy the $i^{th}$ house, if the defence system of the $i^{th}$ house $A_i$, is **strictly less** than $X$. Also, when the $i^{th}$ house is destroyed due to the bomb, all houses
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