以下这个解法也是参考了一些讨论: https://leetcode.com/discuss/110235/c-solution-using-euclidean-algorithm 还有这个解释原理的,没有看懂:https://leetcode.com/discuss/110525/a-little- ...
分类:
其他好文 时间:
2016-06-27 15:38:27
阅读次数:
269
题目描述: You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it i ...
分类:
其他好文 时间:
2016-06-24 18:45:32
阅读次数:
117
#include <iostream> using namespace std; #define MAXSIZE 30 void FindWater(int ID[], int len,int water[]) { int counter[3]; //计数器 counter[0]=counter[1 ...
分类:
其他好文 时间:
2016-06-23 14:13:25
阅读次数:
120
#include <iostream> using namespace std; #define MAXSIZE 20 void FindWater(int ID[],int len,int &water) { int counter=0; //计数器 for(int i=0;i<len;i++) ...
分类:
其他好文 时间:
2016-06-23 14:10:31
阅读次数:
163
http://blog.csdn.net/rain_butterfly/article/details/42170601 代码检查工具能帮我们检查一些隐藏的bug,代码检查工具中sonar是比较好的一个。官网 Sonar 概述 Sonar 是一个用于代码质量管理的开放平台。通过插件机制,Sonar ...
分类:
移动开发 时间:
2016-06-20 06:27:29
阅读次数:
566
题目: 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 e ...
分类:
其他好文 时间:
2016-06-14 13:43:50
阅读次数:
146
题目描述: 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 ...
分类:
其他好文 时间:
2016-06-14 06:19:00
阅读次数:
150
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 adjacen ...
分类:
其他好文 时间:
2016-06-13 13:08:29
阅读次数:
100
Container With Most Water
Total Accepted: 80614 Total
Submissions: 230716 Difficulty: Medium
Given n non-negative integers a1, a2,
..., an, where each represents a point at...
分类:
其他好文 时间:
2016-06-12 02:44:00
阅读次数:
163
Trapping Rain Water
Total Accepted: 68935 Total
Submissions: 211305 Difficulty: Hard
Given n non-negative integers representing an elevation map where the width of each bar i...
分类:
移动开发 时间:
2016-06-12 02:01:15
阅读次数:
194