C++ Solution Beats 100%
IntuitionThis solution uses a 3D dynamic programming (DP) approach to maximize the amount of coins the robot can collect while neutralizing at most 2 cells with
# Intuition
This solution uses a 3D dynamic programming (DP) approach to maximize the amount of coins the robot can collect while neutralizing at most 2 cells with negative coins.

States:
dp[k][i][j] represents the maximum coins collected when reaching cell (i, j) with k remaining neutralizations available.

k = 2: The robot hasn't neutralized any cells yet.
k = 1: The robot has neutralized 1 cell.
k = 0: The robot has exhausted its neutralization ability.
Transitions:
Either to the right or bottom 
From the top (dp[k][i-1][j]) or left (dp[k][i][j-1]) cells, add the coins at (i, j).
If the current cell has negative coins and k > 0, use a neutralization to keep the value unchanged.
Base Case:
At the starting point (0, 0):

dp[0][0][0] = coins[0][0] (if no neutralization is used).
Adjust states for negative coins accordingly.
Result:
The answer is the maximum value among dp[0][n-1][m-1], dp[1][n-1][m-1], and dp[2][n-1][m-1], which represent all possible scenarios of neutralization usage.

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    int maximumAmount(vector<vector<int>>& coins) {
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        cout.tie(nullptr);

        int n = (int)coins.size(), m = (int)coins[0].size();
        long dp[3][n][m]; 
        for (int k = 0; k < 3; k++) {
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    dp[k][i][j] = -1e9;
                }
            }
        }

        dp[0][0][0] = coins[0][0];
        if (coins[0][0] < 0) {
            dp[1][0][0] = 0;
            dp[2][0][0] = 0;
        }

        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                for (int k = 2; k >= 0; k--) {
                    if (i == 0 && j == 0) continue;

                    if (i > 0) {
                        dp[k][i][j] = max(dp[k][i][j], dp[k][i - 1][j] + coins[i][j]);
                        if (coins[i][j] < 0 && k > 0) {
                            dp[k][i][j] = max(dp[k][i][j], dp[k - 1][i - 1][j]);
                        }
                    }
                    if (j > 0) {
                        dp[k][i][j] = max(dp[k][i][j], dp[k][i][j - 1] + coins[i][j]);
                        if (coins[i][j] < 0 && k > 0) {
                            dp[k][i][j] = max(dp[k][i][j], dp[k - 1][i][j - 1]);
                        }
                    }
                }
            }
        }

        return max({dp[0][n - 1][m - 1], dp[1][n - 1][m - 1], dp[2][n - 1][m - 1]});
    }
};

```
['Dynamic Programming', 'C++']