Snake And Arena
CodeChefOpen on judge ↗
Tanmay decided to play the Hungry Snake game on his mobile where the snake has to find the food in the shortest time. But he is not finding his mobile anywhere. He comes to you sadly, and as a coder it's your work to design a game for him. $0$ indicate a blank square tile of dimension $1$ X $1$. Each $1$ X $1$ tile takes one second for the snake to pass. $1$ indicate the position of the food.
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