码迷,mamicode.com
首页 >  
搜索关键字:water    ( 3290个结果
Leetcode 200 Number of Islands
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 adjacent ...
分类:其他好文   时间:2015-06-11 16:47:25    阅读次数:97
Trapping Rain Water
一看这道题太简单就没自己写了,代码中A=height是为了能直接用别人的代码。转自:http://m.blog.csdn.net/blog/nerv3x3/37339357思路:将一个数列看成是一堆高低不一的蓄水墙,数值即这面墙的高度,求总的蓄水最大量。其实题目中的图就已经一目了然了,无需过多文字说...
分类:移动开发   时间:2015-06-10 23:55:08    阅读次数:144
Container With Most Water
用两个指针从数组的左边和右边开始,向中间搜索。依据的理由有两点:1、因为一开始底边长就已经是最大,两个指针向中间移动的时候,底边长只会变短,因此如果此时面积要变大的话,只能是两条高中的最短者比移动前的最短高更高,否则就无需考察,直接continue到下一次的循环。2、因此,每次选择移动左指针还是右指...
分类:其他好文   时间:2015-06-09 19:20:10    阅读次数:96
Container With Most Water :
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). Fin...
分类:其他好文   时间:2015-06-09 13:53:19    阅读次数:104
unity, water cube
《纪念碑谷》里有一关开始是一个宝箱展开后里面有一个water cube,其中还有小鱼在游。如下截图:因为我们知道《纪念碑谷》是unity做的,而现在正开始学unity,所以也想做一个类似的。unity5的standard assets里面有一个WaterProDaytime,折射和反射都有,开始以为...
分类:编程语言   时间:2015-06-08 06:11:56    阅读次数:642
Container With Most Water
题目: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 en...
分类:其他好文   时间:2015-06-06 07:56:30    阅读次数:145
hdu2022(water~~)海选女主角
http://acm.hdu.edu.cn/showproblem.php?pid=2022二B了,没读题直接错了两次。。。。郁闷 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using name...
分类:其他好文   时间:2015-06-05 21:05:36    阅读次数:110
[Water]序号呼唤
第四届河南省大学生程序设计竞赛 第一题题目描述Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐标快速计算出来。单元格的行坐标是由数字编号的数字序号,而列坐标使用字母序号。观察字母序号,发现第1列到第26列的字母序号分别为A,B,…,Z,接着,第27列序号为AA,第28列为AB,...
分类:其他好文   时间:2015-06-04 22:15:24    阅读次数:173
Java 学习————线程直接通信
class Water{ //水塘类 static Object water=new Object(); static int total=6; //假设水塘总共可以含水量为6 static int mqsl=3; //假设水塘中拥有含水量为3 static int ps=0; //假设水塘目前含水量为0 } class ThreadA extends Thread{ ...
分类:编程语言   时间:2015-06-03 21:41:37    阅读次数:139
[Water]Hdu 1022 Train Problem I
#include #include #include #include #include using namespace std;int n;string a,b;string ans;stacks;queueq;int main(){ while(cin>>n>>a>>b){ int index....
分类:其他好文   时间:2015-06-03 19:35:08    阅读次数:88
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!