← All problemsSign in

Bomb Blast

CodeChefRating 2632Open on judge ↗

You are given an array $A$ of size $N$ such that $A_i = 0$ initially, for all $1\le i \le N$. You have $M$ enemies and each enemy will blast one bomb on an index. The $i^{th}$ enemy $(1\le i \le M)$ will place their bomb at index $X_i$, and the bomb will have a range of $Y_i$. This means that, due to the $i^{th}$ bomb, all indices in the range $[X_i-Y_i, X_i+Y_i]$ might be affected: - For indi

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