Given an m x n matrix of positive integers representing the height of each unit cell in a 2D elevation map, compute the volume of water it is able to trap after raining. Note:Both m&...
给定一个m x n的矩阵,其中的值均为正整数,代表二维高度图每个单元的高度,请计算图中形状最多能接多少体积的雨水。说明:m 和 n 都是小于110的整数。每一个单位的高度都大于0 且小于 20000。示例:给出如下 3x6 ...