
POJ
文章平均质量分 79
编码之夜
产品研发工程师
展开
-
POJ1258
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 38753 Accepted: 15637DescriptionFarmer John has been elected mayor of his town! One of his campaig原创 2014-07-18 19:56:07 · 558 阅读 · 0 评论 -
POJ2524(简单并查集)
Ubiquitous ReligionsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 24762 Accepted: 12220题目链接:http://poj.org/problem?id=2524DescriptionThere are so原创 2014-09-29 20:44:49 · 656 阅读 · 0 评论 -
POJ1611(简单并查集)
The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 22938 Accepted: 11152题目链接:DescriptionSevere acute respiratory syndrome (SARS), an atypic原创 2014-09-29 21:08:59 · 536 阅读 · 0 评论 -
POJ1094(模拟····拓扑)
Sorting It All OutTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionAn ascending sorted sequence of distinct values is one in which some form of a l原创 2014-10-02 14:08:56 · 649 阅读 · 0 评论 -
POJ2395(最小生成树Kruskal算法)
Out of HayTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11541 Accepted: 4501DescriptionThe cows have run out of hay, a horrible event that must be原创 2014-10-31 21:07:59 · 700 阅读 · 0 评论 -
POJ1502(Dijkstra)
MPI MaelstromTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 5538 Accepted: 3451题目链接:DescriptionBIT has recently taken delivery of their new supercomp原创 2014-11-07 20:53:55 · 1394 阅读 · 0 评论 -
POJ1423
Big NumberTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 25246 Accepted: 8084DescriptionIn many applications very large integers numbers are required. So原创 2014-06-13 21:12:52 · 569 阅读 · 0 评论 -
POJ1001(JAVA高精度幂)
题目链接:http://poj.org/problem?id=1001解题思路:JAVA高精度大法好······stripTrailingZeros()去除后置0,toPlainString()取消科学计数法。算完之后转换成String,用startsWith检查是否有前导0。如果有的话用substring从小标1开始截取。完整代码:import java.math原创 2015-01-14 12:33:40 · 604 阅读 · 0 评论 -
POJ1002(字符串+map大法+模拟)
题目链接:http://poj.org/problem?id=1002解题思路:此题有坑,刚开始输入字符串是一定要用char *,用string的话会超时。思路很简单,就是边输入边处理,将字符串处理成要求格式。这里用到map大法,各种hash映射。最后记得要排下序(升序),如果没有满足条件的话,要输出No duplicates.完整代码://#include原创 2015-01-14 14:27:45 · 879 阅读 · 0 评论 -
POJ3255(次短路)
题目链接:点击打开链接解题思路:按照Dijkstra思想做的次短路,第一次用邻接表,注意题中是双向边并且节点的下标要分别-1.完整代码:#include #include #include #include #include #include #include #include #include using namespace std;typed原创 2015-03-27 20:54:42 · 1452 阅读 · 0 评论 -
POJ3723(邻接表+并查集+Kruskal)
题目链接:点击打开链接解题思路:根据相互之间的关系,可以转化一个无向图中最大权森林的问题。也就是把边权取反,然后用最小生成树求解。本题用邻接表存储,Kruskal求最小生成树。完整代码:#include #include #include #include #include #include #include #include #include原创 2015-03-28 13:25:05 · 1974 阅读 · 0 评论 -
POJ1006(中国剩余定理+大衍求一术)
BiorhythmsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 115292 Accepted: 36148题目链接:http://poj.org/problem?id=1006DescriptionSome people believe that原创 2014-11-08 21:15:18 · 2049 阅读 · 1 评论 -
POJ3268(Dijkstra)
Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 13103 Accepted: 5883题目链接:http://poj.org/problem?id=3268DescriptionOne cow from each of原创 2014-11-08 18:14:08 · 1117 阅读 · 0 评论 -
POJ2492(并查集)
A Bug's LifeTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 28882 Accepted: 9423题目链接:http://poj.org/problem?id=2492DescriptionBackground Professor原创 2014-11-08 13:57:15 · 958 阅读 · 0 评论 -
POJ1088
滑雪Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长原创 2014-07-20 20:28:36 · 478 阅读 · 0 评论 -
POJ3984
迷宫问题Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescription定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,原创 2014-07-20 20:44:05 · 590 阅读 · 0 评论 -
POJ1195
Mobile phonesTime Limit:5000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionSuppose that the fourth generation mobile phone base stations in the Tampere a原创 2014-07-28 13:56:39 · 684 阅读 · 0 评论 -
POJ2309
BSTTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmitStatusDescriptionConsider an infinite full binary search tree (see the figure below), the numbers in th原创 2014-07-28 14:43:50 · 727 阅读 · 0 评论 -
POJ1753
Flip GameTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusAppoint description:DescriptionFlip game is played on a rectangular 4x4 field with two-sided piece原创 2014-08-05 10:44:19 · 549 阅读 · 0 评论 -
POJ1328
Radar InstallationTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmitStatusAppoint description:DescriptionAssume the coasting is an infinite straight lin原创 2014-08-05 13:16:44 · 541 阅读 · 0 评论 -
POJ2965
The Pilots Brothers' refrigeratorTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusAppoint description:DescriptionThe game “The Pilots Brothers: following原创 2014-08-05 11:35:00 · 495 阅读 · 0 评论 -
POJ2109
Power of CryptographyTime Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64uSubmit StatusAppoint description:DescriptionCurrent work in cryptography involves (among other thin原创 2014-08-05 20:00:39 · 552 阅读 · 0 评论 -
POJ3461
OulipoTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 24338 Accepted: 9763DescriptionThe French author Georges Perec (1936–1982) once wrote a book,原创 2014-09-26 22:10:48 · 632 阅读 · 0 评论 -
POJ2352(树状数组)
StarsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 33786 Accepted: 14741题目链接:http://poj.org/problem?id=2352DescriptionAstronomers often examine star原创 2014-11-08 10:55:19 · 1022 阅读 · 0 评论 -
POJ2769(同余 + 暴力)
题目链接:点击打开链接解题思路:求组内最小的m使得组内各个数对m求余所的值均不同。暴力的判断吧。发现一个有趣的规律,G++省时间废内存,C++费时间省内存。另外此题的数组不宜开的过大,我开了个10^6的数组,接下来各种超时,换成10^5就过了。另外,我试了下用set结果还是超时。完整代码:#include #include #include #includ原创 2015-03-24 19:15:17 · 1141 阅读 · 0 评论