python3 recursive dp
Code

# Code
```python3 []
class Solution:
    def maxScore(self, n: int, k: int, stayScore: List[List[int]], travelScore: List[List[int]]) -> int:
        @cache
        def dp(curr,i):
            if i == k:
                return 0
            ans = stayScore[i][curr] + dp(curr,i+1)
            for dest in range(n):
                ans = max(ans,travelScore[curr][dest]+dp(dest,i+1))
            return ans
        
        ans = 0
        for i in range(n):
            ans = max(ans,dp(i,0))
        return ans
```
['Python3']