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....
分类:
移动开发 时间:
2014-11-15 07:47:26
阅读次数:
242
描述When Teddy was a child , he was always thinking about some simple math problems ,such as “What it’s 1 cup of water plus 1 pile of dough ..” , “100 y...
分类:
其他好文 时间:
2014-11-15 06:32:43
阅读次数:
127
问题描述:
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...
分类:
其他好文 时间:
2014-11-13 22:32:10
阅读次数:
251
题目描述:
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...
分类:
移动开发 时间:
2014-11-06 13:06:41
阅读次数:
239
0. 引子
一直想随便写写自己关于水面效果2D实现的一些了解,可惜各种原因一直拖沓,幸而近来有些事情终算告一段落,自己也有了一些闲暇时间,于是便有了这篇东西 :)
1. 概述
关于水面效果的实现方法,google一下非常之多,目前的很多游戏也有非常好的呈现,其中最令我印象深刻的当数《Crysis》~
自己由于工作原因接触过一段时间的Cr...
分类:
其他好文 时间:
2014-11-05 13:11:05
阅读次数:
347
A problem is easy描述When Teddy was a child , he was always thinking about some simple math problems ,such as “What it’s 1 cup of water plus 1 pile of d...
分类:
其他好文 时间:
2014-11-02 17:57:15
阅读次数:
141
Transfer waterTime Limit: 5000/3000 MS (Java/Others)Memory Limit: 65768/65768 K (Java/Others) 【Problem Description】XiaoA lives in a village. Last year...
分类:
其他好文 时间:
2014-11-01 17:38:35
阅读次数:
253
高斯消元+位运算枚举自由变元#include #include #include #include #include #include #include #include #include #include #include #include using namespace std;const in...
分类:
其他好文 时间:
2014-11-01 11:21:55
阅读次数:
194
题目:hdoj 4009 Transfer water
题意:题目有点长,说是有个村子,有 n 户人家要用水,他们加的位置用三维坐标来表示(x,y,z),他们有两种选择:
1:自己挖一口井,花费为 z * cost_x
2:从别人家接个水管引过来,化为为距离 * cost_y,如果要引的地方比当前地方低的话,还要买一个水泵,花费cost_z。
距离算法|x2‐x1|+|y2‐y1|...
分类:
其他好文 时间:
2014-10-31 20:45:40
阅读次数:
242
题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ...
分类:
编程语言 时间:
2014-10-30 07:09:03
阅读次数:
274