← All problemsSign in

Greedy or DP

Abhishek and Anuj are playing a game on a matrix that consists of **2** rows and $N$ columns. Each cell contains some coin in it. At the start of the game both of them are at the cell $(1,1)$. They will perform moves to reach the cell $(2,N)$. The possible moves are: - Move right from cell $(i,j)$ to $(i,j+1)$. - Move down from cell $(i,j)$ to $(i+1,j)$. Abhishek will start first and will rea

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