SIMPLE 5 LINE SOLUTION EVER ON INTERNET  check out once if you don't believe me.
Intuition\nwe just have to take record of initial and final position of each move and rest of the intermediate cells will always cancles each other \n\n# Approa
# Intuition\nwe just have to take record of initial and final position of each move and rest of the intermediate cells will always cancles each other \n\n# Approach\nfor each cell just look for the minimum value in it\'s to left part because max score can be made by min initial point and maximum end point\n\n# Complexity\n- Time complexity:\nO(N^2); but quite simple approach\n\n- Space complexity:\nO(1);\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int maxScore(vector<vector<int>>& grid) {\n       \n        int result=INT_MIN;\n        for(int i=0; i<grid.size(); i++){\n            for(int j=0; j<grid[0].size(); j++){\n                int min_value=INT_MAX;\n                if(i==0 and j==0){\n                    continue;\n                }\n                if(i!=0){\n                    min_value=min(min_value,grid[i-1][j]);\n                }\n                if(j!=0){\n                    min_value=min(min_value,grid[i][j-1]);\n                }\n                result=max(result,grid[i][j]-min_value);\n                grid[i][j]=min(grid[i][j],min_value);\n            }   \n        }\n        return result;\n    }\n};\n```
['Array', 'Dynamic Programming', 'Matrix', 'C++']