
POJ
文章平均质量分 77
synapse7
这个作者很懒,什么都没留下…
展开
-
A+B Problem新解
#includeint cal(int a,int b){ __asm //嵌入汇编标记 { mov eax,a; mov ebx,b; add eax,ebx; }}int main(){ int a,b; scanf("%d%d",&a,&b); printf("%d\n",cal(a,b原创 2013-08-01 10:10:30 · 1054 阅读 · 0 评论 -
HDU 1102/POJ 2421 Constructing Roads(MST&Prim优化)
Constructing Roadshttp://acm.hdu.edu.cn/showproblem.php?pid=1102http://poj.org/problem?id=2421DescriptionThere are N villages, which are numbered from 1 to N, and you should build some原创 2013-08-06 15:30:46 · 1099 阅读 · 0 评论 -
POJ 3067 Japan(树状数组求逆序对)
Japanhttp://poj.org/problem?id=3067Time Limit: 1000MSMemory Limit: 65536KDescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must b原创 2013-07-27 12:48:48 · 1448 阅读 · 0 评论 -
POJ 3253 Fence Repair(优先队列&哈夫曼树)
Fence Repairhttp://poj.org/problem?id=3253Time Limit: 2000MSMemory Limit: 65536KDescriptionFarmer John wants to repair a small length of the fence around the pasture. He me原创 2013-08-01 15:03:57 · 1260 阅读 · 0 评论 -
POJ 1258 Agri-Net(MST)
Agri-Nethttp://poj.org/problem?id=1258Time Limit: 1000MSMemory Limit: 10000KDescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring原创 2013-08-06 09:39:09 · 1143 阅读 · 0 评论 -
POJ 3629 Card Stacking(队列,两种方法)
Card Stackinghttp://poj.org/problem?id=3629Time Limit: 1000MSMemory Limit: 65536KDescriptionBessie is playing a card game with her N-1 (2 ≤ N ≤ 100) cow friends using a d原创 2013-08-01 10:42:03 · 3519 阅读 · 10 评论 -
POJ 3522 Slim Span(MST)
Slim Spanhttp://poj.org/problem?id=3522Time Limit: 5000MSMemory Limit: 65536KDescriptionGiven an undirected weighted graph G, you should find one of spanning trees specified as fol原创 2013-08-07 11:21:14 · 1003 阅读 · 0 评论 -
POJ 1679 The Unique MST(次小生成树&Kruskal)
The Unique MSThttp://poj.org/problem?id=1679DescriptionGiven a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connect原创 2013-08-06 23:46:44 · 1232 阅读 · 0 评论 -
POJ 1125 Stockbroker Grapevine(最短路&Floyd)
Stockbroker Grapevinehttp://poj.org/problem?id=1125Time Limit: 1000MSMemory Limit: 10000KDescriptionStockbrokers are known to overreact to rumours. You have been contracted to原创 2013-08-10 11:04:38 · 880 阅读 · 0 评论 -
POJ 1061 青蛙的约会( 扩展欧几里得)
青蛙的约会http://poj.org/problem?id=1061Time Limit: 1000MSMemory Limit: 10000KDescription两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚原创 2013-08-12 14:15:10 · 976 阅读 · 0 评论 -
POJ 2115 C Looooops(扩展欧几里得)
C Looooopshttp://poj.org/problem?id=2115Time Limit: 1000MSMemory Limit: 65536KDescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variabl原创 2013-08-12 21:10:17 · 904 阅读 · 0 评论 -
POJ 2992 Divisors(质因数计数公式)
Divisorshttp://poj.org/problem?id=2992Time Limit: 1000MSMemory Limit: 65536KDescriptionYour task in this problem is to determine the number of divisors of Cnk. Just for fun原创 2013-08-13 11:40:50 · 1304 阅读 · 0 评论 -
POJ 3233 Matrix Power Series (矩阵&快速等比数列求和取模)
Matrix Power Serieshttp://poj.org/problem?id=3233Time Limit: 3000MSMemory Limit: 131072KDescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A +原创 2013-08-25 20:30:19 · 1144 阅读 · 0 评论 -
POJ 2260 Error Correction (模拟)
Error Correctionhttp://poj.org/problem?id=2260Time Limit: 1000MSMemory Limit: 65536KDescriptionA boolean matrix has the parity property when each row and each column has an原创 2013-08-29 18:57:30 · 1505 阅读 · 0 评论 -
POJ 2271 HTML (字符串处理)
HTMLhttp://poj.org/problem?id=2271Time Limit: 1000MSMemory Limit: 65536KDescriptionIf you ever tried to read a html document on a Macintosh, you know how hard it is if no N原创 2013-08-29 19:29:50 · 1045 阅读 · 0 评论 -
POJ 2479 Maximum sum (DP&双最大子段和)
Maximum sumhttp://poj.org/problem?id=2479Time Limit: 1000MSMemory Limit: 65536KDescriptionGiven a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below:原创 2013-08-29 15:42:37 · 1094 阅读 · 0 评论 -
UVa 11292 / POJ 3646 / HDU 1902 Dragon of Loowater (贪心)
11292 - Dragon of LoowaterTime limit: 1.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=456&page=show_problem&problem=2267Once upon a time, in the原创 2013-09-01 09:37:41 · 979 阅读 · 0 评论 -
POJ 1068 Parencodings (字符串处理)
Parencodingshttp://poj.org/problem?id=1068Time Limit: 1000MSMemory Limit: 10000KDescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in t原创 2013-08-28 21:32:11 · 846 阅读 · 0 评论 -
POJ 2245 Lotto (枚举)
Lottohttp://poj.org/problem?id=2245Time Limit: 1000MSMemory Limit: 65536KDescriptionIn the German Lotto you have to select 6 numbers from the set {1,2,...,49}. A popular原创 2013-08-23 13:08:41 · 1030 阅读 · 0 评论 -
POJ 2006 Litmus Test (简单数学&弱酸的电离常数)
Litmus Testhttp://poj.org/problem?id=2006Time Limit: 1000MSMemory Limit: 30000KDescriptionThe pH scale measures the concentration of protons (H+) in a solution and, therefore原创 2013-09-12 22:42:51 · 1405 阅读 · 0 评论 -
POJ 3070 Fibonacci(矩阵快速幂)
Fibonaccihttp://poj.org/problem?id=3070Time Limit: 1000MSMemory Limit: 65536KDescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n原创 2013-08-12 21:47:57 · 815 阅读 · 0 评论 -
UVa 10127/POJ 2551 Ones (模运算&转换思想)
10127 - OnesTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=13&page=show_problem&problem=1068Given any integer 0 Sample input3 7 99原创 2013-08-09 20:31:36 · 1074 阅读 · 0 评论 -
UVa 10140 / POJ 2689 Prime Distance (素数距离&筛两遍)
Prime Distancehttp://poj.org/problem?id=2689Time Limit: 1000MSTime Limit: 1000MSDescriptionThe branch of mathematics called number theory is about properties of numbers. On原创 2013-08-12 14:16:01 · 1197 阅读 · 0 评论 -
POJ 2606 / URAL 1502 Rabbit hunt (计算几何)
1052. Rabbit HuntTime limit: 1.0 secondMemory limit: 64 MBA good hunter kills two rabbits with one shot. Of course, it can be easily done since for any two points we can always draw a li原创 2013-09-21 06:37:00 · 1479 阅读 · 0 评论 -
UVa 10038 / POJ 2575 / ZOJ 1879 Jolly Jumpers (water ver.)
10038 - Jolly JumpersTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=979http://poj.org/problem?id=2575ht原创 2013-09-21 06:13:28 · 1865 阅读 · 0 评论 -
POJ 3253 Fence Repair (贪心&优先队列)
z原创 2013-09-24 19:02:51 · 1364 阅读 · 0 评论 -
POJ 3544 Journey with Pigs (贪心&排序不等式)
Journey with Pigshttp://poj.org/problem?id=3544Time Limit: 1000MSMemory Limit: 65536KDescriptionFarmer John has a pig farm near town A. He wants to visit his friend living原创 2013-09-26 07:47:54 · 1428 阅读 · 0 评论 -
POJ 2083 Fractal (分形&分治)
Fractalhttp://poj.org/problem?id=2083Time Limit: 1000MSMemory Limit: 30000KDescriptionA fractal is an object or quantity that displays self-similarity, in a somewhat techni原创 2013-09-28 22:17:21 · 1797 阅读 · 0 评论 -
UVa 439/HDU 1372/POJ 2243/ZOJ 1091 Knight Moves(BFS&纯数学方法)
439 - Knight MovesTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=105&page=show_problem&problem=380http://acm.hdu.edu.cn/showproblem.php?原创 2013-08-03 19:35:48 · 1285 阅读 · 0 评论 -
UVa 10714 / POJ 1852 / ZOJ 2376 Ants (等价转化思想)
10714 - AntsTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=1655An army of ants walk on a horizontal pole o原创 2013-08-04 12:56:38 · 1406 阅读 · 0 评论 -
POJ 2242 The Circumference of the Circle (计算几何)
The Circumference of the Circlehttp://poj.org/problem?id=2242Time Limit: 1000MSMemory Limit: 65536KDescriptionTo calculate the circumference of a circle seems to be an easy原创 2013-09-28 21:27:28 · 2157 阅读 · 1 评论 -
POJ 1833 排列 (STL)
排列http://poj.org/problem?id=1833Time Limit: 1000MSMemory Limit: 30000KDescription题目描述: 大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3原创 2013-09-28 21:40:34 · 2103 阅读 · 0 评论 -
POJ 1835 宇航员 (模拟&三维向量旋转)
宇航员http://poj.org/problem?id=1835Time Limit: 2000MSMemory Limit: 30000KDescription问题描述: 宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头顶方向为z轴正方向,则宇航员的初始状态如下原创 2013-10-24 00:23:07 · 3160 阅读 · 0 评论 -
POJ 1780 Code (十进制格雷码&欧拉回路)
Codehttp://poj.org/problem?id=1780Time Limit: 1000MSMemory Limit: 65536KDescriptionKEY Inc., the leading company in security hardware, has developed a new kind of safe. To原创 2013-10-23 23:55:53 · 1172 阅读 · 0 评论 -
POJ 2478 Farey Sequence(Farey数列&欧拉函数求和)
Farey Sequencehttp://poj.org/problem?id=2478Time Limit: 1000MSMemory Limit: 65536KDescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible r原创 2013-08-12 23:56:47 · 1416 阅读 · 0 评论 -
POJ 1979 Red and Black (DFS)
Red and Blackhttp://poj.org/problem?id=1979Time Limit: 1000MSMemory Limit: 30000KDescriptionThere is a rectangular room, covered with square tiles. Each tile is colored eit原创 2013-11-06 21:32:28 · 1232 阅读 · 0 评论 -
POJ 3176 Cow Bowling (简单DP)
Cow Bowlinghttp://poj.org/problem?id=3176Time Limit: 1000MSMemory Limit: 65536KDescriptionThe cows don't use actual bowling balls when they go bowling. They each take a num原创 2013-11-24 21:20:13 · 1388 阅读 · 0 评论 -
POJ 2251 Dungeon Master (BFS)
Dungeon Masterhttp://poj.org/problem?id=2251Time Limit: 1000MSMemory Limit: 65536KDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dung原创 2013-11-10 14:20:48 · 1346 阅读 · 0 评论 -
POJ 2524 Ubiquitous Religions (并查集)
Ubiquitous ReligionsTime Limit: 5000MSMemory Limit: 65536KDescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interest原创 2013-07-25 11:34:56 · 1421 阅读 · 0 评论 -
【ACM训练计划】POJ 题目分类 【初级、中级、高级】
POJ上的一些水题(可用来练手和增加自信)(poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094)初级:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法.转载 2013-11-30 17:58:26 · 5228 阅读 · 0 评论