DP
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```csharp []\npublic class Solution {\n    public int MaxScore(int n, int k, int[][] stayScore, int[][] travelScore) {\n        int days = stayScore.Length, cities = travelScore.Length, res = 0;\n        if (days != k || cities != n || n == 0 || k == 0)\n            return 0;\n\n        int[,] dp = new int[days, cities];\n        int lastDay = days-1;\n        for(int i = 0; i < n; i++)\n        {\n            dp[lastDay, i] = stayScore[lastDay][i];\n            for(int j = 0; j < n; j++)\n            {\n                dp[lastDay, i] = Math.Max(dp[lastDay, i], travelScore[i][j]);\n                if(lastDay == 0)\n                    res = Math.Max(res, dp[lastDay, i]);\n            }\n        }\n\n        for(int day = k-2; day >= 0; day--)\n        {\n            for(int src = 0; src < n; src++)\n            {\n                for(int dst = 0; dst < n; dst++)\n                {\n                    dp[day, src] =Math.Max(dp[day, src], Math.Max(stayScore[day][src] + dp[day+1, src], travelScore[src][dst]+ dp[day+1, dst]));\n                }\n\n                if(day == 0)\n                    res = Math.Max(res, dp[day, src]);\n            }\n        }\n\n        return res;\n    }\n}\n```
[]