Introductory Number Theory
DivisibilityModular Arithmetic
Dynamic Programming
Introduction to DPKnapsack DPPaths on Grids(Optional) Longest Increasing Subsequence
Graphs
Breadth First Search (BFS)Disjoint Set UnionTopological SortShortest Paths with Non-Negative Edge WeightsMinimum Spanning Trees
Data Structures
StacksSliding WindowPoint Update Range Sum
Trees
Euler Tour TechniqueDP on Trees - Introduction(Optional) DP on Trees - Solving For All Roots
Hashing
String Hashing(Optional) Unordered Sets & Maps(Optional) A Faster Hash Table in C++

CSES - Array Description

Author: Andrew Wang

Appears In

  • Gold - Paths on Grids

Edit with LiveUpdate

Editorial (icecuber)

Time Complexity: O(NM)\mathcal{O}(NM)O(NM)

Show Solution

Join the USACO Forum!

Stuck on a problem, or don't understand a module? Join the USACO Forum and get help from other competitive programmers!

Join Forum