码迷,mamicode.com
首页 >  
搜索关键字:poj 2007 scrambled p    ( 20315个结果
POJ 2309 BST 树状数组基本操作
DescriptionConsider an infinite full binary search tree (see the figure below), the numbers in the nodes are 1, 2, 3, .... In a subtree whose root nod...
分类:其他好文   时间:2014-07-06 13:23:06    阅读次数:229
poj 1676 What time is it?
DescriptionAn accutron shows time with four digits, from 0000 to 2359. Every digit is represented by 3*3 characters, including '|'s, '_'s and blanks. ...
分类:其他好文   时间:2014-07-06 13:19:09    阅读次数:300
POJ 2485 Highways
最小生成树问题。 求最小生成树的最大边,没有坑点。 #include #include #include #include #include #include #include #include #include #include #include #include #define INF 0x7fffffff #define eps 1e-6 using namespace std;...
分类:其他好文   时间:2014-07-06 11:58:51    阅读次数:272
UVa 127 - "Accordian" Patience POJ 1214 链表题解
UVa和POJ都有这道题。 不同的是UVa要求区分单复数,而POJ不要求。 使用STL做会比较简单,这里纯粹使用指针做了,非常麻烦的指针操作,一不小心就错。调试起来还是非常费力的 本题理解起来也是挺费力的,要搞清楚如何模拟也不容易啊,读题要很仔细。 纯指针的操作挺快的吧。不过POJ 0ms,而UVa就0.2左右了。 三相链表: 1 只要有叠起来的牌,那么就使用一个down指针指向下面的...
分类:其他好文   时间:2014-07-06 10:43:43    阅读次数:283
poj 2264 Advanced Fruits(DP)
Advanced Fruits Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 1944   Accepted: 967   Special Judge Description The company "21st Century Fruits" has spec...
分类:其他好文   时间:2014-07-06 10:23:04    阅读次数:166
POJ 2395 Out of Hay
跟我上一篇解题报告一样,都是找最小生成树的最大边。 依然Kruskal,每次比较找最大即可。 有人问我为啥一直CE,妥妥的不看题目,都说了可能有重复的边,存储边数组的开大一点就好了。 #include #include #include #include #include #include #include #include #include #include #include #i...
分类:其他好文   时间:2014-07-06 10:22:28    阅读次数:192
POJ 3625 Building Roads
最小生成树模版题。 N个点,M条已经存在的边。 算出两两点之间的距离,然后Kruskal。 #include #include #include #include #include #include #include #include #include #include #include #include #define INF 0x7fffffff #define eps 1e-6...
分类:其他好文   时间:2014-07-06 09:38:58    阅读次数:171
POJ 3522 Slim Span
最小生成树+枚举。 题意是说在一个无向图的所有生成树中,选取最小“苗条”值的。 “苗条”的定义是生成树中权值最大的边 减去 权值最小的边的 值。 我的思路是 排序,然后从 0~m枚举。每次必然加入枚举的那一条边。 然后 向其左右分别 选择边加入。直到构成生成树,不能就返回INF。 其实我感觉我的代码有点问题,我没有比较左右当中谁更 接近 枚举的那条...
分类:其他好文   时间:2014-07-06 08:15:29    阅读次数:190
poj 2406 Power Strings(KMP&思维)
Power Strings Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 31093   Accepted: 12974 Description Given two strings a and b we define a*b to be their concate...
分类:其他好文   时间:2014-07-06 00:33:22    阅读次数:253
POJ 2084 Catalan数
【题意】:一个环上有2*N个连续的数,求将这些数两两连接且连接的边不相交的方法数。【知识点】:数学+Catalan数令h(1)=1,h(0)=1递归式1:h(n)= h(0)*h(n-1)+h(1)*h(n-2) + ... + h(n-1)h(0) (其中n>=2) 递归式2:h(n)=((4.....
分类:其他好文   时间:2014-07-05 22:32:22    阅读次数:314
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!