This commit is contained in:
2026-01-22 23:51:20 +08:00
parent 04aa2ffc7d
commit 124c7332d8
4 changed files with 109 additions and 0 deletions

15
26/01/1895.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include <vector>
class Solution {
public:
int largestMagicSquare(std::vector<std::vector<int>>& grid) {
int m = grid.size();
int n = grid[0].size();
std::vector<std::vector<int>> preM(m,std::vector<int>(n,0)),preN(m,std::vector<int>(n,0));
for (int i = 0; i < m; i++) {
for(int j = 0;j < n;j++){
preM[m][n] += grid[m][n];
}
}
}
};