码迷,mamicode.com
首页 >  
搜索关键字:poj 1979    ( 20310个结果
POJ 3258 River Hopscotch
DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. T...
分类:其他好文   时间:2014-07-22 22:53:55    阅读次数:250
POJ 3984 迷宫问题
Description定义一个二维数组:int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走...
分类:其他好文   时间:2014-07-22 22:53:33    阅读次数:275
poj 1269 Intersecting Lines(判相交交点与平行)
http://poj.org/problem?id=1269Time Limit:1000MSMemory Limit:10000KTotal Submissions:10379Accepted:4651DescriptionWe all know that a pair of distinct p...
分类:其他好文   时间:2014-07-22 22:53:16    阅读次数:314
POJ 1410 Intersection(线段相交&&推断点在矩形内&&坑爹)
Intersection大意:给你一条线段,给你一个矩形,问是否相交。 相交:线段全然在矩形内部算相交;线段与矩形随意一条边不规范相交算相交。思路:知道详细的相交规则之后题事实上是不难的,可是还有个坑点就是题目里明明说给的是矩形左上角跟右下角的点,但实际上不是,须要又一次推断一下...真坑。s...
分类:其他好文   时间:2014-07-22 22:52:59    阅读次数:157
POJ 3258
二分搜索实例 ,先排序,算出每一个石头的间隔,从l和最小间隔中二分找答案#include #include using namespace std;int a[50010],n,m;bool cmp(int a,int b){ return am) return 0; else retu...
分类:其他好文   时间:2014-07-19 22:27:54    阅读次数:280
poj 1035 -- Spell checker
Spell checkerTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 18712Accepted: 6856DescriptionYou, as a member of a development team for a new s...
分类:其他好文   时间:2014-07-19 22:21:14    阅读次数:203
Oulipo
poj3461:http://poj.org/problem?id=3461题意:求一个串在另一个串中出现的次数。题解:直接套用KMP即可,在统计的时候做一下修改。找到之后不是直接返回,而是移动i-(j-next[j])位。 1 #include 2 #include 3 #include 4 #d...
分类:其他好文   时间:2014-07-19 18:30:48    阅读次数:137
POJ 3984
bfs,用数组来构建队列,用front指针来连接每一步输出的时候注意(0, 0)逗号后又一个空格。。。。被坑了一次#include using namespace std;struct step{ int x,y; step *front; void init(int xx,int yy){ x=x...
分类:其他好文   时间:2014-07-19 18:17:27    阅读次数:260
poj 3311Hie with the Pie
题意:一个送披萨的,每次送外卖不超过10个地方,给你这些地方之间的时间,求送完外卖回到店里的总时间最小。解法一: 这个n不大即使是NP问题也才1E6多一些所以可以dfs();具体的回溯方法结合dance link 就可以; #include #include #include #include .....
分类:其他好文   时间:2014-07-19 14:12:38    阅读次数:148
POJ 1915(双向广搜)
双向的广度优先搜索搜哦!...
分类:其他好文   时间:2014-07-19 13:48:19    阅读次数:183
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!