← All problemsSign in

Huge Grid (Easy Version)

CodeChefRating 1455Open on judge ↗

**This is the easy version of the problem. Here yout task is to find the minimum possible path sum.** Given a binary sequence $A$ of length $N$, we construct an $N \times N$ matrix $B$ as follows: - If $i \leq j$, then $B_{i,j} = \sum_{k=i}^j A_k$. - Otherwise, $B_{i,j} = B_{j,i}$. Define a path from $(1,1)$ to $(N, N)$ as a sequence of pairs: $$ P = [(i_1,j_1), (i_2,j_2), \dots, (i_{2N-1},j_{

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