Shooting (Hard)
**This is the hard version of the problem. The only difference between this and easy version is the constraints on $N$ — notably, in this version, $N \leq 3 \cdot 10^5$.\ This problem is worth $90$ points in division $2$ and $100$ points in division $1$** Aarsi and Krypto were competing in a shooting game. You are given a matrix $A$ of size $N \times M$ representing a shooting board. The cell
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