My Logic
I have made two DP arrays dp_f and dp_b.
Observe that moving backwards from any point to square 1 is the same as moving from square 1 to that point.
Each DP array stores the maximum sum possible.
dp_b includes the first element of the squares in all paths.
Can anyone provide a countercase or point out a hole in the logic?
@therealnishuz @everule1