← All problemsSign in

Cheese Fight

One thing Tom wants more than to eat Jerry is to not let Jerry have his favorite cheese cube. Tom, Jerry and the cheese-cube are present in an m x n grid. Now Tom and Jerry both set some traps for each other. There are some cells with traps set by Jerry for Tom and some with traps set by Tom for jerry. We also know the position of cheese-cube and initial positions of Tom and Jerry. Given that b

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