← All problemsSign in

Jerry in a trap

Problem description. Jerry made a mess of the house of which Tom was a pet cat. The owner scolded Tom thinking it to be his mistake. But Tom knew it was Jerry who had done this. Tom now made a plan to take revenge from Jerry. Tom set up a cheese trap for him. While Jerry was running away from Tom he got trapped in it and Tom started laughing. Jerry wants to get out of the trap for which he will

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