acm学习之路
文章平均质量分 75
心若向阳_无谓悲伤
既然选择了远方,便只顾风雨兼程
展开
-
费马小定理
费马小定理是数论中的一个重要定理,其内容为: 假如p是质数,且(a,p)=1,那么 a^(p-1) ≡1(mod p)。即:假如a是整数,p是质数,且a,p互质,那么a的(p-1)次方除以p的余数恒等于1。转载 2014-07-24 19:52:30 · 741 阅读 · 0 评论 -
畅通工程再续(最小生成树) hdu acm 1875 c++
畅通工程再续Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15329 Accepted Submission(s): 4745Problem Description相信大家都听说一个“百岛湖”的地原创 2014-08-19 21:21:42 · 826 阅读 · 0 评论 -
继续畅通工程 (最小生成树) hdu ACM 1879 c++
继续畅通工程Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13981 Accepted Submission(s): 6080Problem Description省政府“畅通工程”的目标是使全省原创 2014-08-19 21:27:27 · 1043 阅读 · 0 评论 -
畅通工程续 (dijkstra) hdu 1874 c++
畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 28714 Accepted Submission(s): 10433Problem Description某省自从实行了很多年的畅通工程计划后原创 2014-08-19 21:40:39 · 772 阅读 · 0 评论 -
火星A+B hdu ACM 1230 C++
火星A+BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10551 Accepted Submission(s): 3514Problem Description读入两个不超过25位的火星正整数A和B原创 2014-08-07 16:49:20 · 771 阅读 · 0 评论 -
A + B hdu ACM 1228 c++
A + BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11904 Accepted Submission(s): 6953Problem Description读入两个小于100的正整数A和B,计算原创 2014-08-07 16:59:19 · 553 阅读 · 0 评论 -
Dividing hdu acm 1059 c++
DividingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16824 Accepted Submission(s): 4705Problem DescriptionMarsha and Bill ow原创 2014-08-11 21:15:09 · 565 阅读 · 0 评论 -
Til the Cows Come Home poj 2387 c++
Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 29656 Accepted: 9970DescriptionBessie is out in the field and wants to get back to t原创 2014-08-11 19:47:09 · 608 阅读 · 0 评论 -
来生一起走
Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2367Accepted Submission(s): 1186Problem Description妈妈你别哭泪光照亮不了我们的路让我们自己慢慢的走妈...原创 2019-11-01 16:03:54 · 550 阅读 · 0 评论 -
Stockbroker Grapevine
Stockbroker GrapevineTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 26912 Accepted: 14903DescriptionStockbrokers are known to overreact to rumours. You h原创 2014-08-12 19:23:05 · 537 阅读 · 0 评论 -
Binary Tree Traversals hdu 1710 c++
Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3320 Accepted Submission(s): 1491Problem DescriptionA bin原创 2014-08-14 17:43:08 · 475 阅读 · 0 评论 -
Tree Recovery poj 2255 c++
Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11421 Accepted: 7167DescriptionLittle Valentine liked playing with binary trees very much. He原创 2014-08-14 17:30:09 · 598 阅读 · 0 评论 -
Entropy (哈弗曼树,快排) poj 1521 c++
EntropyTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4919 Accepted: 1923DescriptionAn entropy encoder is a data encoding method that achieves lossless d原创 2014-08-15 09:36:04 · 745 阅读 · 1 评论 -
Fence Repair (哈弗曼树+快排) poj 3253 c++
Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 26361 Accepted: 8550DescriptionFarmer John wants to repair a small length of the fence aroun原创 2014-08-15 09:49:31 · 550 阅读 · 0 评论 -
A == B ? hdu acm 2054 c++
A == B ?Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 61332 Accepted Submission(s): 9578Problem DescriptionGive you two numbe原创 2014-08-18 14:27:30 · 544 阅读 · 0 评论 -
最短路径问题 hdu acm c++
最短路径问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13653 Accepted Submission(s): 4183Problem Description给你n个点,m条无向边,每条边都有长度d和花原创 2014-08-18 14:37:37 · 1226 阅读 · 0 评论 -
A/B(数论水题) hdu ACM 1576 c++
A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2276 Accepted Submission(s): 1647Problem Description要求(A/B)%9973,但由于A很大,我们只给原创 2014-08-18 17:20:27 · 4260 阅读 · 0 评论 -
畅通工程(最小生成树) hdu acm 1863 c++
畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17334 Accepted Submission(s): 7300Problem Description省政府“畅通工程”的目标是使全省任何原创 2014-08-19 21:12:38 · 553 阅读 · 0 评论 -
还是畅通工程 hdu acm 1233 c++
还是畅通工程Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 26120 Accepted Submission(s): 11641Problem Description某省调查乡村交通状况,得到的统原创 2014-08-19 21:11:39 · 665 阅读 · 0 评论 -
prim算法模板—最小生成树
设G = (V,E)是无向连通带权图,即一个网络。E中的每一条边(v,w)的权为c[v][w]。如果G的子图G’是一棵包含G的所有顶点的树,则称G’为G的生成树。生成树上各边权的总和称为生成树的耗费。在G的所有生成树中,耗费最小的生成树称为G的最小生成树。构造最小生成树的两种方法:Prim算法和Kruskal算法。 一、最小生成树的性质 设G = (V,E)是连通带权图,U是V的转载 2014-08-19 20:56:00 · 4489 阅读 · 0 评论 -
HDU最短路劲基础题 难度解析
HDU最短路劲基础题 HDU最短路题目: 1.题号:2544 难度:1 题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2544分析小结:入门级别,甚至floyd都可以过。2.题号:2066 难度:2 题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=转载 2014-08-01 19:39:29 · 1184 阅读 · 0 评论 -
Charm Bracelet poj 3624 (01) 背包问题 c++
Charm BraceletTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23076 Accepted: 10383DescriptionBessie has gone to the mall's jewelry store and spies a原创 2014-08-02 09:16:04 · 1015 阅读 · 0 评论 -
Bone Collector hdu 2602 c++ 01背包 基础题
Bone CollectorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 29278 Accepted Submission(s): 11984Problem DescriptionMany years原创 2014-08-02 11:43:41 · 649 阅读 · 0 评论 -
一只小蜜蜂... (递推) hdu 2044 c++版
#include#include__int64 f[60];void fib(){ int i; memset(f,0,sizeof(f)); f[1]=1; f[2]=1; for(i=3;i f[i]=f[i-1]+f[i-2];}int main(){ int n,m,t;原创 2014-07-31 10:42:43 · 1847 阅读 · 0 评论 -
Sumsets poj 2229 c++
SumsetsTime Limit: 2000MS Memory Limit: 200000KTotal Submissions: 12696 Accepted: 5095DescriptionFarmer John commanded his cows to search for different sets of numb原创 2014-08-05 10:35:13 · 553 阅读 · 0 评论 -
N!Again hdu 2674 c++
N!AgainTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3434 Accepted Submission(s): 1863Problem DescriptionWhereIsHeroFrom:原创 2014-08-05 10:45:20 · 508 阅读 · 0 评论 -
Palindrome poj 1159 c++
PalindromeTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 52560 Accepted: 18119DescriptionA palindrome is a symmetrical string, that is, a string read ide原创 2014-08-05 10:16:20 · 551 阅读 · 0 评论 -
Costume Party poj 3663 c++
Costume PartyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11252 Accepted: 4523DescriptionIt's Halloween! Farmer John is taking the cows to a costum原创 2014-08-05 10:04:14 · 756 阅读 · 0 评论 -
还是A+B hdu ACM 1229 c++
还是A+BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15879 Accepted Submission(s): 7732Problem Description读入两个小于10000的正原创 2014-08-06 13:47:55 · 582 阅读 · 0 评论 -
poj题目分类
POJ上的一些水题(可用来练手和增加自信) (poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094)初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法转载 2014-08-06 10:47:49 · 396 阅读 · 0 评论 -
hdu 题目分类 比较详细
1001 这个就不用说了吧 1002 简单的大数 1003 DP经典问题,最大连续子段和 1004 简单题 1005 找规律(循环点) 1006 感觉有点BT的题,我到现在还没过 1007 经典问题,最近点对问题,用分治 1008 简单题 1009转载 2014-08-05 20:43:36 · 844 阅读 · 0 评论 -
{A} + {B} hdu acm 1412 c++
{A} + {B}Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11825 Accepted Submission(s): 4941Problem Description给你两个集合,要求{A} + {原创 2014-08-18 13:59:38 · 440 阅读 · 0 评论 -
人见人爱A-B hdu acm 2034 c++
人见人爱A-BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 43983 Accepted Submission(s): 12398Problem Description参加过上个月月赛的同学一定还记得其中原创 2014-08-18 14:01:48 · 770 阅读 · 0 评论 -
大明A+B hdu acm 1753 c++
大明A+BTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8477 Accepted Submission(s): 2999Problem Description话说,经过了漫长的一个多月,小明已经成长了许多,原创 2014-08-18 14:04:50 · 507 阅读 · 0 评论 -
错排公式
a[i]=(i-1)(a[i-1]+a[i-2])翻译 2014-07-31 17:46:52 · 465 阅读 · 0 评论 -
EXCEL排序 (sort) hdu ACM 1862 c++
EXCEL排序Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13177 Accepted Submission(s): 5183Problem DescriptionExcel可以对一组纪录按任意指定列原创 2014-08-18 17:21:44 · 1165 阅读 · 0 评论