← All problemsSign in

Balloon Fight

Problem Statement Rohit and Ali are having a water balloon fight on their terrace. Their terrace can be thought of as a grid playing field. In order for any of them to win, one of them needs to get a direct hit and they need to be in a direct line of vision of the other person, horizontal, vertical or diagonal. Given a (P*Q) playing field you will have to decide in how many ways can the two of th

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