The first solution I figured out is O(n^3). I thought it must be O(n^2) to get max points on a line for a given point.. but after checking several art...
分类:
其他好文 时间:
2014-07-22 22:47:15
阅读次数:
226
初始化: std::pair p; //initialize p.first and p.second with zero std::pair p(42, "hello"); make_pair(42, "hello"); // no need for the var name, it's r...
分类:
其他好文 时间:
2014-07-22 22:47:13
阅读次数:
209
1.选用适合的ORACLE优化器 ORACLE的优化器共有3种: a.RULE(基于规则)b.COST(基于成本)c.CHOOSE(选择性) 设置缺省的优化器,可以通过对init.ora文件中OPTIMIZER_MODE参数的各种声明,如RULE,COST,CHOOSE,ALL_ROWS,FIRST...
分类:
数据库 时间:
2014-07-22 22:45:53
阅读次数:
269
1 2 3 showModelessDialogEX.htm 4 15 16 17 Enter your first name: Joan 18 19 20 Here is the code for "myDial...
1.使用vi/vim进行编写代码并保存为hello_world.c.如下:/* This is my first C program*/#include int main(){ printf("Hello World!\n"); return 0;}2.使用gcc进行编译...
分类:
系统相关 时间:
2014-07-22 22:43:35
阅读次数:
243
For the one pass solution... first I tried to build white\blue from red, but not working anyway. Then I referred someone' code, to build red\blue from...
分类:
其他好文 时间:
2014-07-22 22:42:54
阅读次数:
212
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2014-07-22 00:12:36
阅读次数:
156
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2014-07-22 00:09:37
阅读次数:
151
In one embodiment, a first stationary router may detect a disconnected backhaul link to a destination. In response to detecting the disconnected backh...
分类:
其他好文 时间:
2014-07-22 00:01:35
阅读次数:
370
怒拿一血,first blood,第一个区间DP,第一次就这样子莫名其妙不知不觉滴没了~~~
题目虽然是鸟语,但还是很赤裸裸的告诉我们要求最大的括号匹配数,DP走起~
dp[i][j]表示区间[i,j]的最大匹配数,那么最重要的状态转移方程就是:
dp[i][j]=max(dp[i][k]+dp[k+1][j])
对啦,要先初始化边界啊,两步走~:
memset(dp,0,siz...
分类:
其他好文 时间:
2014-07-21 23:27:29
阅读次数:
214