h Jesus! The Minecraft Server of XadillaX's came across a bug!There's one way to solve this bug in game. That is to get a bucket of water and a bucket...
分类:
其他好文 时间:
2014-08-20 17:48:32
阅读次数:
216
O(n^2) is a naive solution. As rule of thumb, there must be O(n) soluion. Yes - greedy (WHY?)class Solution {public: int maxArea(vector &height) ...
分类:
其他好文 时间:
2014-08-16 15:04:30
阅读次数:
153
Description
Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to r...
分类:
其他好文 时间:
2014-08-14 10:59:18
阅读次数:
265
题意 建设一条河岸的污水处理系统 河岸有n个城市 每个城市都可以自己处理污水 V 也可以把污水传到相邻的城市处理 >或< 除了你传给我我也传给你这种情况 其它都是合法的 两端的城市不能传到不存在的城市
令d[i]表示有i个城市时的处理方法数 最后一个城市的处理方法有
1.V 自己处理自己的 与前i-1个城市的处理方法无关 有d[i-1]种方法
2.V...
分类:
其他好文 时间:
2014-08-13 13:13:26
阅读次数:
224
Givennnon-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. 1...
分类:
移动开发 时间:
2014-08-10 01:34:09
阅读次数:
375
Water TreeTime Limit: 4000msMemory Limit: 262144KBThis problem will be judged onCodeForces. Original ID:343D64-bit integer IO format:%I64d Java class ...
分类:
其他好文 时间:
2014-08-09 13:10:37
阅读次数:
362
Transfer water
Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)
Total Submission(s): 3775 Accepted Submission(s): 1356
Problem Description
XiaoA lives...
分类:
其他好文 时间:
2014-08-09 11:46:50
阅读次数:
323
Trapping Rain WaterGivennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to tr...
分类:
移动开发 时间:
2014-08-08 12:30:45
阅读次数:
193
/*本题的题意:沙漠中有很多骆驼和一个池塘,0表示池塘,1-N表示骆驼,输入的两个数表示两只骆驼,其中前面的那一头靠近池塘,所有的骆驼队列不交叉不相连,求站在队尾但是离水井最近的骆驼编号经过分析最后还是要先构造一个树,然后寻找离0最近的一个点,当结果是相等的级别的时候将结果返回最小的那个值*/参考代...
分类:
其他好文 时间:
2014-08-06 18:40:51
阅读次数:
206
题目: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 rain....
分类:
移动开发 时间:
2014-07-30 09:47:13
阅读次数:
272