All the solutions for this problem:
https://cses.fi/problemset/task/1635
are 1D. I struggled to find a 2D DP solution to optimize to 1D instead go jumping straight to 1D.
All the solutions for this problem:
https://cses.fi/problemset/task/1635
are 1D. I struggled to find a 2D DP solution to optimize to 1D instead go jumping straight to 1D.