Quarrels of Tom and Jerry
CodeChefOpen on judge ↗
The quarrels of Tom and Jerry are well known. On day they decide to sign a pact of friendship. Now you may be thinking what is the catch. They can trick each other one last day. Tom gives Jerry N pieces of Cheese stacked in a line. The pieces are numbered 1 to N and placed in bowls also numbered 1 to N. Tom adds a condition that Jerry has to eat the piece of cheese which is in bowl B. Jerry tho
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