Beats 87% | C++
Please upvote <3\n\n\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        int n=grid.size();\n        vector<v
Please upvote <3\n\n```\nclass Solution {\npublic:\n    vector<vector<int>> largestLocal(vector<vector<int>>& grid) {\n        int n=grid.size();\n        vector<vector<int>>res(n-2,vector<int>(n-2,0));\n        for(int i=0;i<n-2;i+=1){\n            for(int j=0;j<n-2;j+=1){\n                int x=0;\n                for(int k=i;k<i+3;k+=1){\n                    for(int l=j;l<j+3;l+=1)\n                        x=max(x,grid[k][l]);\n                    res[i][j]=x;\n                }\n            }\n        }\n        return res;\n    }\n};\n```
[]