水流(water) 时间限制: 1 Sec 内存限制: 64 MB提交: 9 解决: 2[提交][状态][讨论版] 题目描述 全球气候变暖,小镇A面临水灾,于是你必须买一些泵把水抽走。泵的抽水能力可以认为是无穷大,但你必须把泵放在合适的位置,从而能使所有的水能流到泵里。 小镇可以认为是N×M的矩阵, ...
分类:
其他好文 时间:
2016-07-31 11:23:40
阅读次数:
359
题意:给定 n 个数,然后有 q 个询问,问你每个区间的最大值。 析:数据很小,直接暴力即可,不会超时,也可以用RMQ算法。 代码如下: ...
分类:
其他好文 时间:
2016-07-31 01:33:51
阅读次数:
154
Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 28966 Accepted: 14505 Description Due to recent rains, water has pooled in va ...
分类:
其他好文 时间:
2016-07-25 16:07:22
阅读次数:
174
对于一个字符串,将其后缀子串进行排序,例如grain其子串有:grain rain ain in n 然后对各子串按字典顺序排序,即: ain,grain,in,n,rain 每个案例为一行字符串。 将子串排序输出 对位置进行排序,然后输出,真是越来越聪明了 ...
分类:
编程语言 时间:
2016-07-23 00:44:16
阅读次数:
232
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. ...
分类:
移动开发 时间:
2016-07-14 10:05:05
阅读次数:
139
While swimming at the beach, Mike has accidentally dropped his cellphone into the water. There was no worry as he bought a cheap replacement phone wit ...
分类:
其他好文 时间:
2016-07-09 16:27:26
阅读次数:
170
转载请注明出处:http://blog.csdn.net/crazy1235/article/details/51541984Subject
出处:https://leetcode.com/problems/container-with-most-water/ Given n non-negative integers a1, a2, …, an, where each represents...
分类:
其他好文 时间:
2016-07-04 15:41:56
阅读次数:
179
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen ...
分类:
编程语言 时间:
2016-07-04 11:29:34
阅读次数:
141
2016年7月1日 星期五 --出埃及记 Exodus 14:28The water flowed back and covered the chariots and horsemen--the entire army of Pharaoh that had followed the Israeli ...
分类:
其他好文 时间:
2016-07-01 10:17:29
阅读次数:
122
参考:http://blog.csdn.net/sum_rain/article/details/37085771 Token,就是令牌,最大的特点就是随机性,不可预测。一般黑客或软件无法猜测出来。 那么,Token有什么作用?又是什么原理呢? Token一般用在两个地方: 1)防止表单重复提交、 ...
分类:
Web程序 时间:
2016-06-28 12:13:57
阅读次数:
166