随笔分类 -  图论

摘要:Ice_cream’s world II Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5486 Accepted Submission(s): 阅读全文
posted @ 2017-07-29 18:26 Billyshuai 阅读(250) 评论(0) 推荐(0)
摘要:关于为什么不能用Prim求解此类问题,如下 Prim可以看成是维护两个顶点集或者看成维护一颗不断生成的树(感觉前一种说法好一点) 倘若是有向图有三个顶点1.2.3 边的情况如下 1->2: 5 1->3: 6 2->3: 1000861 3->2: 2 显然若是按照Prim算法来说,先将顶点一压入集 阅读全文
posted @ 2017-07-29 14:32 Billyshuai 阅读(1096) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/kuangbin/p/3147329.html #include<cstdio>#include<cstring>#include<algorithm>using namespace std;const int N=110;const int INF=0 阅读全文
posted @ 2017-07-28 15:46 Billyshuai 阅读(199) 评论(0) 推荐(0)
摘要:Picnic Planning Time Limit: 5000MS Memory Limit: 10000K Total Submissions: 10642 Accepted: 3862 Description The Contortion Brothers are a famous set o 阅读全文
posted @ 2017-07-27 22:26 Billyshuai 阅读(231) 评论(0) 推荐(0)
摘要:Minimal Ratio TreeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4462 Accepted Submission(s): 14 阅读全文
posted @ 2017-07-26 21:35 Billyshuai 阅读(131) 评论(0) 推荐(0)
摘要:After going through the receipts from your car trip through Europe this summer, you realised that the gas prices varied between the cities you visited 阅读全文
posted @ 2017-07-26 19:49 Billyshuai 阅读(225) 评论(0) 推荐(0)
摘要:Farmer John has decided to reward his cows for their hard work by taking them on a tour of the big city! The cows must decide how best to spend their 阅读全文
posted @ 2017-07-26 17:33 Billyshuai 阅读(185) 评论(0) 推荐(0)
摘要:For their physical fitness program, N (2 ≤ N ≤ 1,000,000) cows have decided to run a relay race using the T (2 ≤ T ≤ 100) cow trails throughout the pa 阅读全文
posted @ 2017-07-26 16:29 Billyshuai 阅读(170) 评论(0) 推荐(0)
摘要:Description Tour operator Your Personal Holiday organises guided bus trips across the Benelux. Every day the bus moves from one city S to another city 阅读全文
posted @ 2017-07-26 11:23 Billyshuai 阅读(281) 评论(0) 推荐(0)
摘要:Description Christmas is coming to KCM city. Suby the loyal civilian in KCM city is preparing a big neat Christmas tree. The simple structure of the t 阅读全文
posted @ 2017-07-26 10:10 Billyshuai 阅读(191) 评论(0) 推荐(0)
摘要:Remmarguts' Date Time Limit: 4000MS Memory Limit: 65536K Total Submissions: 30017 Accepted: 8159 Description "Good man never makes girls wait or break 阅读全文
posted @ 2017-07-25 10:50 Billyshuai 阅读(229) 评论(0) 推荐(0)
摘要:1040: [ZJOI2008]骑士 Description Z国的骑士团是一个很有势力的组织,帮会中汇聚了来自各地的精英。他们劫富济贫,惩恶扬善,受到社会各 界的赞扬。最近发生了一件可怕的事情,邪恶的Y国发动了一场针对Z国的侵略战争。战火绵延五百里,在和平环境 中安逸了数百年的Z国又怎能抵挡的住Y 阅读全文
posted @ 2017-06-30 11:34 Billyshuai 阅读(514) 评论(0) 推荐(0)
摘要:https://wenku.baidu.com/view/ce296043192e45361066f575.html //仙人掌图基础知识3个判定条件 http://blog.csdn.net/yihuikang/article/details/7904347 //参考代码 题目:HDU 3594 阅读全文
posted @ 2017-06-13 16:17 Billyshuai 阅读(857) 评论(0) 推荐(0)
摘要:1016: [JSOI2008]最小生成树计数 Description 现在给出了一个简单无向加权图。你不满足于求出这个图的最小生成树,而希望知道这个图中有多少个不同的 最小生成树。(如果两颗最小生成树中至少有一条边不同,则这两个最小生成树就是不同的)。由于不同的最小生 成树可能很多,所以你只需要输 阅读全文
posted @ 2017-05-29 15:11 Billyshuai 阅读(1150) 评论(0) 推荐(0)