题意:在坐标轴的x轴上的0,1,2,3,4、、、、n处有n+1块木板,长度不一,任两块加上x轴即可构成一个容器,其装水面积为两板的间距与较短板长之积,以vector容器给出一系列值,分别代表在0,1,2,3,4、、、vector.size()-1共size个短板,是连续的,不排除有板长为0的可能性,...
分类:
其他好文 时间:
2015-03-18 23:01:52
阅读次数:
276
problem:
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai).
n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0)...
分类:
其他好文 时间:
2015-03-18 15:53:14
阅读次数:
110
前几天偶然听到了James blunt的cry,然后就把他所有的歌翻出来听了个遍,然后才发现他就是唱那首You’re beautiful的那个人,我的列表里还有他的1973,只是新发现的Best laid plans、cry、Tears and rain、shine on、、、、着实耐听,单曲循环都舍不得。
今天百度了一下Tears and rain,才知道歌还有背景。歌词Tears...
分类:
其他好文 时间:
2015-03-18 01:15:34
阅读次数:
126
题意:Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in the...
分类:
其他好文 时间:
2015-03-12 17:01:39
阅读次数:
128
Trapping Rain Water问题:Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to...
分类:
移动开发 时间:
2015-03-12 09:45:06
阅读次数:
150
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.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1]...
分类:
移动开发 时间:
2015-03-11 17:22:23
阅读次数:
160
例子1:
[maokx@localhost example]$ more trapping
#!/bin/sh
# Scriptname: trapping
# Script to illustrate the trap command and signals
trap 'echo "Ctrl-C will not terminate $0."' 2
trap 'echo "Ct...
分类:
系统相关 时间:
2015-03-10 12:08:44
阅读次数:
173
Transfer waterTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 3995Accepted Submission(s): 1438Pr.....
分类:
其他好文 时间:
2015-03-10 08:56:55
阅读次数:
152
给你n个杯子,每次有特定的到水规则,倒m次请问最后每个被子里还有多少水我们很容易发现每次变化的规则相同,那么可以set 一个矩阵存放然后多次倒水就相当于矩阵相乘,在m 范围达到(1#include #include #include #include #include #include #inclu...
分类:
其他好文 时间:
2015-03-08 21:30:13
阅读次数:
148
Container With Most Water问题:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn suc...
分类:
其他好文 时间:
2015-03-08 19:58:18
阅读次数:
123