码迷,mamicode.com
首页 >  
搜索关键字:poj 3122 pie 二分    ( 34803个结果
POJ 1163 The Triangle (简单线性dp)
OJ题目 : click here~~ 题目分析:给一个数字三角形,从最上面一个数字开始,方向只能往左下或者右下,一直到最后一行,求经过的所有数字和的最大值。 搞清楚在输入的数据中,route的方向就行。 AC_CODE int num[102][102]; int main(){ int n , i , j , k ; while(cin >> n){ ...
分类:其他好文   时间:2014-07-22 23:05:55    阅读次数:372
HDOJ 4614 Vases and Flowers
线段树+二分区间 用线段树维护某一段内还有多少个花瓶可以用,二分确定插入的左右界..... Vases and Flowers Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1782    Accepted Submis...
分类:其他好文   时间:2014-07-22 23:05:54    阅读次数:307
POJ 3239 n皇后放置问题
以前那个是8皇后问题,用的递归写法,然后这个可以求n皇后放置问题,用的纯粹数学方法……神奇! #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #d...
分类:其他好文   时间:2014-07-22 23:04:55    阅读次数:205
POJ 3352 Road Construction 使得无向图边变双连通图
点击打开链接 Road Construction Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8168   Accepted: 4106 Description It's almost summer time, and that means that...
分类:其他好文   时间:2014-07-22 23:04:33    阅读次数:277
poj 2299 Ultra-QuickSort
Ultra-QuickSort Time Limit: 7000MS   Memory Limit: 65536K Total Submissions: 38588   Accepted: 13903 Description In this problem, you have to analyze a particular sorti...
分类:其他好文   时间:2014-07-22 23:02:34    阅读次数:303
POJ 1920 Towers of Hanoi
OJ题目:click here~~ 题目分析:三根柱子 , n个圆盘 。给一个汉诺塔的状态,求将所有盘挪到一个柱子上的最少步数,并给出是最后在哪个柱子上。 从给定状态到目标状态很复杂,但是从目标状态到给定的状态就很容易想了。将一个柱子上i个盘,挪到另一个柱子上,需要pow(2,i) - 1步。 显然,最后在的那个柱子,一定是所给状态下最大盘所在的柱子。接下来考虑第二大的盘,需要移动就移动。……...
分类:其他好文   时间:2014-07-22 23:02:14    阅读次数:279
POJ 1463 Strategic game 最小点覆盖集(树形dp)
点击打开链接 Strategic game Time Limit: 2000MS   Memory Limit: 10000K Total Submissions: 6105   Accepted: 2808 Description Bob enjoys playing computer games, especially st...
分类:其他好文   时间:2014-07-22 23:01:55    阅读次数:304
HDU 2389 Rain on your Parade
http://acm.hdu.edu.cn/showproblem.php?pid=2389题意:给暴风雨到来的时刻,m个人的坐标和单位速度,和n个救生衣的坐标。每个救生衣只能匹配一个人,求最多有多少人可以得到救生衣。题解:典型二分图最大匹配题型。因为点比较多,使用Hopcroft-Karp算法。讲...
分类:其他好文   时间:2014-05-01 22:25:49    阅读次数:546
状态压缩经典题目(poj1184 nyoj81)
题目描述: 描述 司令部的将军们打算在N*M的网格地图上部署他们的炮兵部队。一个N*M的地图由N行M列组成,地图的每一格可能是山地(用"H" 表示),也可能是平原(用"P"表示),如下图。在每一格平原地形上最多可以布置一支炮兵部队(山地上不能够部署炮兵部队);一支炮兵部队在地图上的攻击范围如图中黑色区域所示:  如果在地图中的灰色所标识的平原上部署一支炮兵部队,则图中的黑色的...
分类:其他好文   时间:2014-04-30 22:32:38    阅读次数:398
[ACM] poj 1700 Crossing River (经典过河问题)
Crossing River Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 10212   Accepted: 3855 Description A group of N people wishes to go across a river with only one...
分类:其他好文   时间:2014-04-30 22:21:38    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!