- 博客(41)
- 资源 (1)
- 收藏
- 关注
原创 POJ 1995 Raising Modulo Numbers (快速幂)
Raising Modulo Numbers Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 5043 Accepted: 2930 Description People are different. Some secretly read magazines
2015-03-31 20:27:46
453
原创 POJ 3641 Pseudoprime numbers (快速幂、素性测试)
Pseudoprime numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7076 Accepted: 2900 Description Fermat's theorem states that for any prime number p a
2015-03-31 20:25:36
603
原创 Uva 10006 Carmichael Numbers (快速幂)
照题意implemente就好~ 然后快速幂~ AC代码如下: // // Uva 10006 Carmichael Numbers // // Created by TaoSama on 2015-03-24 // Copyright (c) 2015 TaoSama. All rights reserved. // #include #include #include #i
2015-03-31 20:21:40
499
原创 POJ 3292 Semi-prime H-numbers (变形埃氏筛法)
Semi-prime H-numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7777 Accepted: 3364 Description This problem is based on an exercise of David Hilber
2015-03-31 20:17:26
452
原创 POJ 3421 X-factor Chains (约数枚举)
X-factor Chains Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5605 Accepted: 1770 Description Given a positive integer X, an X-factor chain of length m
2015-03-31 20:16:07
641
原创 POJ 3126 Prime Path (bfs、埃氏筛法)
Prime Path Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12750 Accepted: 7219 Description The ministers of the cabinet were quite upset by the message
2015-03-31 20:14:18
476
原创 AOJ 0009 Prime Number (埃氏筛法)
Prime Number Time Limit : 1 sec, Memory Limit : 65536 KB Japanese version is here Prime Number Write a program which reads an integer n and prints the number of prime numbers which
2015-03-31 20:10:59
678
原创 POJ 1930 Dead Fraction (小数化分数)
Dead Fraction Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 2080 Accepted: 661 Description Mike is frantically scrambling to finish his thesis at the l
2015-03-31 20:07:34
667
原创 POJ 2429 GCD & LCM Inverse (大整数素性测试与因式分解)
GCD & LCM Inverse Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 10429 Accepted: 1917 Description Given two positive integers a and b, we can easily cal
2015-03-31 19:28:10
880
原创 POJ 2395 Out of Hay (MST)
Out of Hay Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11853 Accepted: 4642 Description The cows have run out of hay, a horrible event that must be r
2015-03-23 22:07:07
488
原创 AOJ 2224 Save your cat (kruskal求最大生成森林)
Save your cat Time Limit : 8 sec, Memory Limit : 65536 KB Problem C: Save your cats Nicholas Y. Alford was a cat lover. He had a garden in a village and kept many cats in his garden. Th
2015-03-23 22:04:09
827
原创 POJ 2377 Bad Cowtractors (kruskal求MST)
Bad Cowtractors Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11136 Accepted: 4688 Description Bessie has been hired to build a cheap internet network
2015-03-23 21:59:00
554
原创 POJ 1258 Agri-Net (prim求MST)
Agri-Net Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 42748 Accepted: 17466 Description Farmer John has been elected mayor of his town! One of his cam
2015-03-23 21:57:34
441
原创 POJ 3723 Conscription (kruskal最大生成森林)
Conscription Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8479 Accepted: 2959 Description Windy has a country, and he wants to build an army to protec
2015-03-23 21:54:57
608
原创 AOJ 2200 Mr. Rito Post Office (Floyd预处理、dp)
快递到了:你是某个岛国(ACM-ICPC Japan)上的一个苦逼程序员,你有一个当邮递员的好基友利腾桑遇到麻烦了:全岛有一些镇子通过水路和旱路相连,走水路必须要用船,在X处下船了船就停在X处。而且岛上只有一条船,下次想走水路还是得回到X处才行;两个镇子之间可能有两条以上的水路或旱路;邮递员必须按照清单上的镇子顺序送快递(镇子可能重复,并且对于重复的镇子不允许一次性处理,比如ABCB的话B一定要按
2015-03-23 21:52:13
1093
原创 AOJ 2249 Road Construction (dijkstra最短路)
Road Construction Time Limit : 8 sec, Memory Limit : 65536 KB Problem H: Road Construction King Mercer is the king of ACM kingdom. There are one capital and some cities in his kingdom.
2015-03-23 21:48:33
908
原创 POJ 3268 Silver Cow Party (dijkstra来回最短路)
Silver Cow Party Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13576 Accepted: 6123 Description One cow from each of N farms (1 ≤ N ≤ 1000) convenientl
2015-03-23 21:43:52
500
原创 POJ 2139 Six Degrees of Cowvin Bacon (Floyd)
Six Degrees of Cowvin Bacon Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3289 Accepted: 1530 Description The cows have been making movies lately, so t
2015-03-23 21:39:15
477
原创 AOJ 0189 Convenient Location (Floyd)
题意: 求某一个办公室 到其他所有办公室的 总距离最短 办公室数 不超过10 输入: 多组输入,每组第一行为n (1 ≤ n ≤ 45),接下来n行是 (x, y, d),x到y的距离是d 输出: 办公室号 和 最短距离 Floyd水题 - - AC代码如下: // // AOJ 0189 Convenient Location // /
2015-03-23 21:35:34
830
原创 POJ 3169 Layout (Bellman-Ford、差分约束)
Layout Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7834 Accepted: 3753 Description Like everyone else, cows like to stand close to their friends when
2015-03-23 21:23:18
482
原创 POJ 3255 Roadblocks (dijkstra最短路)
Roadblocks Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 8382 Accepted: 3030 Description Bessie has moved to a small farm and sometimes enjoys returnin
2015-03-23 21:21:20
527
原创 AOJ 2170 Marked Ancestor (并查集)
Marked Ancestor You are given a tree T that consists of N nodes. Each node is numbered from 1 to N, and node 1 is always the root node of T. Consider the following two operations on T: M
2015-03-17 18:20:35
718
原创 POJ 1703 Find them, Catch them (并查集)
Find them, Catch them Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 33685 Accepted: 10399 Description The police office in Tadu City decides to say end
2015-03-17 18:15:37
402
原创 POJ 2236 Wireless Network (并查集)
Wireless Network Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 17584 Accepted: 7410 Description An earthquake takes place in Southeast Asia. The ACM (
2015-03-17 18:14:09
447
原创 POJ 1182 食物链 (并查集)
食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 48713 Accepted: 14202 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动
2015-03-17 13:40:42
436
原创 POJ 2010 Moo University - Financial Aid (优先队列)
Moo University - Financial Aid Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 5541 Accepted: 1659 Description Bessie noted that although humans have man
2015-03-17 13:30:33
460
原创 POJ 3614 Sunscreen (贪心、优先队列)
Sunscreen Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4478 Accepted: 1557 Description To avoid unsightly burns while tanning, each of the C (1 ≤ C ≤
2015-03-17 12:08:21
619
原创 POJ 2431 Expedition (贪心、优先队列)
Expedition Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7980 Accepted: 2339 Description A group of cows grabbed a truck and ventured on an expedition
2015-03-17 12:06:21
782
原创 POJ 2184 Cow Exhibition (dp)
Cow Exhibition Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9687 Accepted: 3747 Description "Fat and docile, big and dumb, they look so stupid, they a
2015-03-08 00:31:13
434
原创 POJ 2392 Space Elevator (dp)
Space Elevator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8929 Accepted: 4232 Description The cows are going to space! They plan to achieve orbit by
2015-03-08 00:29:04
455
原创 POJ 3666 Making the Grade (dp)
Making the Grade Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4404 Accepted: 2094 Description A straight dirt road connects two fields on FJ's farm, b
2015-03-08 00:25:42
1577
原创 POJ 1631 Bridging signals (dp)
Bridging signals Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11270 Accepted: 6146 Description 'Oh no, they've done it again', cries the chief designe
2015-03-08 00:23:20
434
原创 POJ 1065 Wooden Sticks (dp)
Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18903 Accepted: 7954 Description There is a pile of n wooden sticks. The length and weight
2015-03-08 00:19:13
458
原创 POJ 3181 Dollar Dayz (dp)
Dollar Dayz Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 4442 Accepted: 1716 Description Farmer John goes to Dollar Days at The Cow Store and discover
2015-03-07 02:06:04
420
原创 POJ 3046 Ant Counting (dp)
Ant Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3111 Accepted: 1233 Description Bessie was poking around the ant hill one day watching the a
2015-03-07 01:54:21
414
原创 POJ 1742 Coins (dp)
Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 29974 Accepted: 10171 Description People in Silverland use coins.They have coins of value A1,A2,A3.
2015-03-07 01:52:18
440
原创 POJ 3280 Cheapest Palindrome (dp)
Cheapest Palindrome Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6243 Accepted: 3041 Description Keeping track of all the cows can be a tricky task so
2015-03-07 01:44:31
380
原创 POJ 3616 Milking Time (dp)
Milking Time Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5266 Accepted: 2172 Description Bessie is such a hard-working cow. In fact, she is so focuse
2015-03-07 01:38:32
481
原创 POJ 2385 Apple Catching (dp)
Apple Catching Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 8363 Accepted: 4093 Description It is a little known fact that cows love apples. Farmer Jo
2015-03-07 01:07:13
579
原创 POJ 2229 Sumsets (dp)
Sumsets Time Limit: 2000MS Memory Limit: 200000K Total Submissions: 13788 Accepted: 5480 Description Farmer John commanded his cows to search for different sets of
2015-03-07 00:44:52
410
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人