-----QUESTION-----
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). Find two lines, which together with x-axis forms ...
分类:
其他好文 时间:
2014-09-24 20:39:27
阅读次数:
218
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]...
分类:
移动开发 时间:
2014-09-23 16:46:54
阅读次数:
224
最简单的DFS
Lake Counting
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 20516
Accepted: 10338
Description
Due to recent rains, water has pooled in various pla...
分类:
其他好文 时间:
2014-09-20 10:08:07
阅读次数:
259
第一步:创建Store数据源
var myData = [];
myData.push({ 'name': '1', 'Oil_Production': '30', 'Water_Injection': '55', 'Gas_Production': '23' });
myData.push({ 'name': '2', 'Oil_Production': '20', 'Wa...
分类:
Web程序 时间:
2014-09-19 15:38:55
阅读次数:
262
这题想到思路就很简单:从两边开始,短板往中间走。可以仔细想下,为什么这样可以保证得到最大容量?首先,从两边开始肯定是没问题的,因为包括了所有的板。为什么短板往中间走就是对的?短板是限制容器容量的,如果长板往中间走,得到的容器必然比先前的容器小(宽度减小,高度不能增加)。而短板往里走,虽然宽度减小,却...
分类:
其他好文 时间:
2014-09-18 20:37:54
阅读次数:
161
点击打开链接
有向无环图的最小路径覆盖 = 顶点数- 最大匹配
#include
#include
#include
#include
#include
using namespace std;
const int maxn = 150;
int g[maxn][maxn];
int n, m;
int link[maxn];
bool used[maxn];
bool...
分类:
其他好文 时间:
2014-09-18 11:30:34
阅读次数:
154
前面介绍过,虽然苹果公司禁止在iOS开发中使用动态库,而且也从XCode中移除了创建静态框架的功能,但我们还是可以通过对XCode进行小小的改动来创建静态框架。编译环境:Macbook Air + OS X 10.9.2 + XCode5.1 + iPhone5s(iOS7.0.3)首先创建一个静....
分类:
移动开发 时间:
2014-09-14 21:57:27
阅读次数:
403
编译环境:Macbook Air + OS X 10.9.2 + XCode5.1 + iPhone5s(iOS7.0.3)一、首先将资源文件打包成bundle由于bundle是静态的,所以可以将“iOS开发之静态库(三)—— 图片、界面xib等资源文件封装到.a静态库”中生成的“MyToolsWi...
分类:
移动开发 时间:
2014-09-14 21:55:37
阅读次数:
5447
编译环境:Macbook Air + OS X 10.9.2 + XCode5.1 + iPhone5s(iOS7.0.3)一、首先将资源文件打包成bundle新建工程:File -> New -> Project... -> OS X -> Framework & Library -> Bundl...
分类:
移动开发 时间:
2014-09-14 20:43:57
阅读次数:
437
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]...
分类:
移动开发 时间:
2014-09-13 21:34:25
阅读次数:
219