记录每个列和列之间的pair,然后下次用到就累加,降维的思想 #include <bits/stdc++.h> using namespace std; class Solution { public: int countCornerRectangles(vector<vector<int>>& grid) { int m = grid.size(); int n = grid[0].size(); vector<vector<int>> dp(n,vector<i...