Rick, Morty and the Grid
CodeChefOpen on judge ↗
There is an m x n grid. Rick is standing on the upper left corner of the grid, while Morty is standing on the bottom right corner of the grid. Rick wants to reach Morty, however he can only move one step down or one step right at a time. There are two types of squares in the grid, black and white. Rick cannot cross black squares. The squares on which Rick and Morty are standing are white. Can you
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