题意: 给定 n n n个区间 [ L i , R i ] [L_i,R_i] [Li,Ri]设集合 A { { p i } ∣ p i 为排列, L i < p i < R i } A\{ \{ p_i\} | p_i为排列,Li<p_i<R_i\} A{{pi}∣pi为排列,Li<pi<Ri}ÿ…
题目: 题解:
class Solution {
public:int trapRainWater(vector<vector<int>>& heightMap) {int m heightMap.size(), n heightMap[0].size();int maxHeight 0;int dirs[] {-1, 0, 1, 0, -1};for (int i 0; i < m; i) {maxHei…