P用于存放原矩阵子矩阵的和,P[i][j]表示矩阵mat[1][1]至[i][j]的和,若要求[a][b]到[c][d]的和,则用P[c][d] - P[a][d] - P[c][b] + P[a][b]
class Solution {
public:
int maxSideLength(vector<vector<int>>& mat, int threshold) {
int row = mat.size();
int col = mat[0].size();
vector<vector<int>> P(row + 1, vector<int>