码迷,mamicode.com
首页 >  
搜索关键字:poj 2034    ( 20310个结果
POJ-2528-Mayor's posters(线段树)
Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city counci...
分类:其他好文   时间:2014-07-06 10:53:28    阅读次数:185
POJ 1258 Agri-Net
最小生成树问题。 用矩阵输入的。 不过很忧伤的是用G++ 提交AC。。C++ 就一直RE。 不过题中说了最多 100 X 100 的矩阵啊。 Logically, they are N lines of N space-separated integers. Physically, they are limited in length to 80 characters, so some l...
分类:Web程序   时间:2014-07-06 09:17:00    阅读次数:312
POJ 2421 Constructing Roads
最小生成树问题。 Kruskal,如果已经有边就合并。 然后找最小。没有坑点。 G++ AC。 #include #include #include #include #include #include #include #include #include #include #include #define INF 0x7fffffff #define eps 1e-6 using n...
分类:其他好文   时间:2014-07-06 09:13:06    阅读次数:205
POJ 1101 The Game(BFS+判方向)
The Game Description One morning, you wake up and think: "I am such a good programmer. Why not make some money?'' So you decide to write a computer game. The game takes place on a rectangular...
分类:其他好文   时间:2014-07-06 09:02:34    阅读次数:287
POJ 2031 Building a Space Station
最小生成树问题。 空间坐标系,还有点的半径。 如果两个点距离减去它们的半径小于0,表明他们重叠了。直接并查集合并。 剩下的就排序,并查。 #include #include #include #include #include #include #include #include #include #include #include #define INF 0x7fffffff #...
分类:其他好文   时间:2014-07-06 09:00:42    阅读次数:172
POJ 2499 Binary Tree 题解
本题使用所谓的辗转相除法。 还需要逆过来遍历二叉树。可以想象给出的数据点是根节点,然后遍历到根节点(1,1)。 考的是根据给出的规则,总结规律的能力。 #include namespace BinaryTree2499_1 { int main() { int T, a, b, le, ri; scanf("%d", &T); for (int t = 1; t <= T; t...
分类:其他好文   时间:2014-07-06 08:11:00    阅读次数:164
POJ 2560 Freckles Prime算法题解
本题是求最小生成树。 给出的是坐标节点,然后需要根据这些坐标计算出各个点之间的距离。 除此就是标准的Prime算法了,能使用Prime的基本上都可以使用Kruskal。 这些经典的算法一定要多写,熟练掌握,否则很难灵活运用的。 而且经典的算法之所以为经典,原因之一是没那么容易自己凭空想象出来的,所以要熟练。 #include #include #include #include ...
分类:其他好文   时间:2014-07-06 00:22:21    阅读次数:338
HDU 1325 Is It A Tree? (POJ 1308)
并查集问题。。。 这题以前做过…… 以前做过…… 做过…… 过…… 不过重做时候被吭得异常之爽…… 在判断 vis[i]的时候。我记得标准C++是非0 即为真。 而我用C++ 提交的时候 if(vis[i]) 去直接给我WA了。 用G++ 就AC了。。。然后改成if(vis[i]==1) 交C++ 就AC了。 特瞄的我每次初始化都把 vis[i] 都赋值为 0...
分类:其他好文   时间:2014-07-06 00:19:08    阅读次数:272
POJ 3613 Cow Relays 恰好n步的最短路径
有T条路,从s到e走n步,求最短路径。...
分类:其他好文   时间:2014-07-05 23:58:20    阅读次数:324
POJ 1861 Network
又是个最小生成树问题。 Special Judge 。答案不唯一。所以样例看起来是错的。。。 又是忧伤的G++ AC。 提交C++ 就WA了。。。 又要顺道求过路大神看看。 #include #include #include #include #include #include #include #include #include #include #include #d...
分类:Web程序   时间:2014-07-05 22:53:37    阅读次数:269
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!