码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
ZOJ 3717 Balloon (二分+2-sat)
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=37172-sat版题对半径R进行二分,将二分得到的R用2-sat判,如果2R 3 #include 4 #include 5 #include 6 #includ...
分类:其他好文   时间:2014-07-26 14:48:00    阅读次数:260
[ACM] ZOJ 3725 Painting Storages (DP计数+组合)
Painting Storages Time Limit: 2 Seconds      Memory Limit: 65536 KB There is a straight highway with N storages alongside it labeled by 1,2,3,...,N. Bob asks you to paint all storages with two...
分类:其他好文   时间:2014-07-26 02:48:17    阅读次数:178
zoj 1891 - 传说中的简答题 - 最短路径 - dijkstra
在复习资料中找到的对应不同类型的题目。想先从简单的题目入手,结果一上来就发现不对劲。感觉有点不简单呀。 之前也是碰到这种问题会畏首畏尾,因为,要计算两点之间的距离的。想着要不要先全部计算出来,放到数组里面分别调用。 但后来又想到不行,这样的时间复杂度更高了,n*(n+1)/2 的时间复杂度。就有点麻乱了。 通过参考网上其他的解答,发现他们也是一边算,一边找的。相比这就是简答题的优势吧。 然...
分类:其他好文   时间:2014-07-26 02:39:26    阅读次数:214
ZOJ 3481. Expand Tab
一个简单题目,给出一些文本片段,把文本中的 Tab 字符根据配置,替换成一定数量的空格。
分类:其他好文   时间:2014-07-26 00:58:26    阅读次数:221
ZOJ 2048 Highways
kruskal实现 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 #define maxn 760 7 int par[maxn]; 8 int pos; 9 int n,m; 10 str...
分类:其他好文   时间:2014-07-26 00:44:26    阅读次数:199
zoj 1453 Surround the Trees(凸包求周长)
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=453Time Limit:2 Seconds Memory Limit:65536 KBThere are a lot of trees in an area. A peas...
分类:其他好文   时间:2014-07-26 00:23:16    阅读次数:351
zoj 2974 Just Pour the Water矩阵快速幂
Just Pour the WaterTime Limit: 2 Seconds Memory Limit: 65536 KBShirly is a very clever girl. Now she has two containers (A and B), each with some wat....
分类:其他好文   时间:2014-07-25 18:58:22    阅读次数:374
ZOJ 1203 Swordfish
#include #include double dis[105][105];double p[105][2]; //输入坐标点double d[105]; //一点到另一点的距离double vis[105]; //记得该点是否已被访问double len;int n;//初始化dis[105.....
分类:其他好文   时间:2014-07-25 10:54:51    阅读次数:252
ZOJ 1093
排序DP(相当于最长不下降子序列)如果把一块砖块的所有6种摆放方式转化为6种不同的砖块;即相当于有6n种砖块,然后按照一个方向从大到小排序;再依次检查每一块与其下面的所有砖块是否满足摆放条件;将每一块砖块放到塔中能够获得的最大高度记录到数组height[N]中;则该数组中的最大值就是该题的解了; #...
分类:其他好文   时间:2014-07-24 21:55:12    阅读次数:181
zoj 2562 More Divisors(反素数)
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1562 题意:求小于等于n(1 16)的约数个数最多的数。 反素数 根据反素数的定义,这个题就是让求最大的反素数。 反素数搜索的依据的两个重要的性质: 反素数的质因子是从2开始的连续的素数; p=2^t1*3^t2*5^t3*7^t4.....必然t1>=...
分类:其他好文   时间:2014-07-24 17:41:46    阅读次数:138
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!