Same Old Matrix Problem
CodeChefOpen on judge ↗
You are given a matrix with N rows and M columns. Cell (x, y) indicates the cell at the intersection of xth row and yth column. Each cell of matrix contains some assigned value (say H). Visiting this cell, you will get H dollars (if H ≥ 0) else you have to pay |H| dollars. You start from cell (1, 1) and you have to reach cell (N, M). From a given cell, you can only move right or down. Formally, fr
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