← All problemsSign in

Students-Far From Hostel

CodeChefRating 2441Open on judge ↗

It's late at night, and the college students are required to return to their college hostels from the hostel garden. The hostel garden is a rectangular field of dimensions $N \times M$, with two hostels — one across the left edge and one across the top edge of the field. Students are currently in the cells of the field. You are given two matrices of size $N \times M$, $A$ and $B$. $A_{i, j}$ den

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