← All problemsSign in

Fly Time

A fly $F$ tired of flying wants to sit on a chess board of dimensions $n×m$ . Each cell of the chess board is a square of size $1×1$ $cm^2$ . The flies of Chef land are weird they can only fly horizontally or vertically. Given that this fly can fly exactly $C$ centimeters in vertical or horizontal direction and after that have to sit on the board to rest for a bit and then continue her journey fur

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