← All problemsSign in

FightBots

CodeChefRating 1329Open on judge ↗

Alice and Bob are competing in the finals of a *FightBots* tournament. The match takes place on the $2$-D plane. Alice's robot starts at position $(0, 0)$, while Bob's starts at position $(X, Y)$. It is guaranteed that $(X, Y) \neq (0, 0)$. The match lasts for $N$ seconds. Every second, both robots *must* move exactly one unit up, down, left, or right. The two robots may move in different di

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