题目: Given n x m non-negative integers representing an elevation map 2d where the area of each cell is 1 x 1, compute how much water it is able to trap ...
分类:
移动开发 时间:
2017-06-22 21:47:12
阅读次数:
276
Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a ...
分类:
其他好文 时间:
2017-06-20 13:36:52
阅读次数:
139
在OC中。除了while这样的循环方式外,还有另外for循环和do-while循环。它们在不同的业务逻辑下会有不同的作用。能够和C语言和Java对照着学习。(一)代码一:int main(int argc, const char * argv[]) { @autoreleasepool { for ...
分类:
其他好文 时间:
2017-06-18 20:46:21
阅读次数:
101
在OSG 实现的oculus rift 效果,还不错这个是Delta3d中实现的OSG 中效果 在OSG 实现的oculus rift 效果,还不错 这个是Delta3d中实现的 OSG 中效果 ...
分类:
其他好文 时间:
2017-06-18 18:09:32
阅读次数:
144
Transfer water Time Limit: 5000/3000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others) Total Submission(s): 3775 Accepted Submission(s): 1356 ...
分类:
其他好文 时间:
2017-06-18 12:02:35
阅读次数:
235
题目链接: http://poj.org/problem?id=2826 题目描述: An Easy Problem?! Description It's raining outside. Farmer Johnson's bull Ben wants some rain to water his ...
分类:
其他好文 时间:
2017-06-18 10:30:38
阅读次数:
218
题目大意是提供n个非负整数,a1,...,an,可以将其理解为多个边界(垂直的线段),其中ai处于x坐标i处,并且ai代表的线段高度即为ai的值。要求我们取这样的i与j,使得ai与aj以及x坐标轴围成的碗状物能容纳面积最多的水(即abs(i-j)*min(ai,aj)最大)。 最简单的方案就是暴力枚 ...
分类:
其他好文 时间:
2017-06-17 21:40:38
阅读次数:
108
Lambda表达式也成为闭包,是java语言层次上的改变,Lambda同意把函数作为一个方法的參数(函数作为參数传递进方法中),或者把代码看成数据。函数式程序猿对这一概念非常熟悉。在JVM平台上有非常多语言(groovy,scala等等)从一開始就有Lambda,可是程序猿不得不使用匿名类来取代la ...
分类:
编程语言 时间:
2017-06-17 13:47:09
阅读次数:
167
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=4183 这题题目意思非常难看懂。。我看了好长时间也没看懂。。终于是从网上找的翻译。。我就在这翻译一下吧。 意思大约是:有多个点,每一个点给出坐标与半径,增加两个点相交,就能够从这两个点走。题目要求先从起点 ...
分类:
其他好文 时间:
2017-06-17 12:14:39
阅读次数:
138