3466. Maximum Coin Collection
ArrayDynamic Programming
Hints
Hint 1
Can we use dynamic programming?
Hint 2
Use dynamic programming with states:
dp[i][lane][rem] = the maximum number of coins you can obtain when you are at mile i in the given lane with rem switches remaining.Preparing judge…