Expect Some Damage
CodeChefOpen on judge ↗
A country can be represented as a grid of $n$ rows and $m$ columns where there are total $n*m$ cities. These cities are about to face bomb attacks. There are $q$ such bombs and we know the probability of each bomb attack and on which cities will it affect. You have given $x1,y1$ and $x2,y2$ and the probability of a drop of bomb. The bomb will affect all the cities in rectangle bound by $x1,y1$ and
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