[ACM]_图论
同学少年
没有什么不可能!
展开
-
[ACM] hdu 3342 Legal or Not (拓扑排序)
Legal or NotProblem DescriptionACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like HH,原创 2014-05-08 08:45:47 · 2897 阅读 · 0 评论 -
[ACM] poj 1236 Network of Schools (有向强连通分量)
Network of SchoolsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11407 Accepted: 4539DescriptionA number of schools are connected to a computer netwo原创 2014-09-25 17:30:16 · 1800 阅读 · 0 评论 -
[ACM] HDU 2255 奔小康赚大钱 (二分图最大权匹配,KM算法)
奔小康赚大钱Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一间房子。另一方面,村长和另外的村领导希望得到最大的效益,原创 2014-10-31 10:26:59 · 1970 阅读 · 0 评论 -
[ACM] HDU 2063 过山车 (二分图,匈牙利算法)
过山车Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11509 Accepted Submission(s): 5066Problem DescriptionRPG girls今天和大家一起去游乐场玩,终原创 2014-10-30 20:39:06 · 2994 阅读 · 1 评论 -
[ACM] HDU 3395 Special Fish (二分图最大权匹配,KM算法)
Special FishProblem DescriptionThere is a kind of special fish in the East Lake where is closed to campus of Wuhan University. It’s hard to say which gender of those fish are, because ever原创 2014-10-31 10:54:11 · 1740 阅读 · 0 评论 -
[ACM] POJ 3686 The Windy's (二分图最小权匹配,KM算法,特殊建图)
The Windy'sTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 4158 Accepted: 1777DescriptionThe Windy's is a world famous toy factory that owns M top-cla原创 2014-11-01 14:02:17 · 2447 阅读 · 0 评论 -
[ACM] HDU 1533 Going Home (二分图最小权匹配,KM算法)
Going HomeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2963 Accepted Submission(s): 1492Problem DescriptionOn a grid map th原创 2014-10-31 20:33:14 · 1966 阅读 · 0 评论 -
[ACM] hihocoder 1062 最近公共祖先·一 (一般做法)
描述小Ho最近发现了一个神奇的网站!虽然还不够像58同城那样神奇,但这个网站仍然让小Ho乐在其中,但这是为什么呢?“为什么呢?”小Hi如是问道,在他的观察中小Ho已经沉迷这个网站一周之久了,甚至连他心爱的树玩具都弃置一边。“嘿嘿,小Hi,你快过来看!”小Ho招呼道。“你看,在这个对话框里输入我的名字,在另一个对话框里,输入你的名字,再点这个查询按钮,就可以查出来……什么!我们居然有原创 2014-11-29 20:31:55 · 2349 阅读 · 0 评论 -
[ACM] SDUT 2883 Hearthstone II (第二类Stiring数)
Hearthstone IITime Limit: 2000ms Memory limit: 65536K 有疑问?点这里^_^题目描述The new season has begun, you have n competitions and m well prepared decks during the new season. Each c原创 2014-11-07 20:44:58 · 2224 阅读 · 0 评论 -
[ACM] hdu 3549 Flow Problem (最大流模板题)
Flow ProblemProblem DescriptionNetwork flow is a well-known difficult problem for ACMers. Given a graph, your task is to find out the maximum flow for the weighted directed graph.原创 2014-09-24 17:12:56 · 3034 阅读 · 0 评论 -
[ACM] POJ 2186 Popular Cows (强连通分量,Kosaraju算法知识整理)
首先是一些知识整理:来源于网络:以下转载于:http://blog.sina.com.cn/s/blog_4dff87120100r58c.html Kosaraju算法是求解有向图强连通分量(strong connectedcomponent)的三个著名算法之一,能在线性时间求解出一个图的强分量。什么是强连通分量?在这之前先定义一个强连通性(strong connectivi原创 2014-09-25 16:10:47 · 2725 阅读 · 0 评论 -
[ACM] POJ 1273 Drainage Ditches (最大流)
Drainage DitchesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 56869 Accepted: 21862DescriptionEvery time it rains on Farmer John's fields, a pond fo原创 2014-09-25 08:57:10 · 2371 阅读 · 0 评论 -
[ACM] hdu 1285 确定比赛名次 (拓扑排序)
确定比赛名次Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10358 Accepted Submission(s): 4046Problem Description有N个比赛队(1原创 2014-05-07 14:31:36 · 2852 阅读 · 0 评论 -
[ACM] hdu 1217 Arbitrage (bellman_ford最短路,判断是否有正权回路或Floyed)
ArbitrageProblem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example,原创 2014-07-15 16:41:51 · 2295 阅读 · 0 评论 -
[ACM] POJ 3259 Wormholes (bellman-ford最短路径,判断是否存在负权回路)
WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 29971 Accepted: 10844DescriptionWhile exploring his many farms, Farmer John has discovered a原创 2014-07-14 21:06:33 · 2572 阅读 · 0 评论 -
[ACM] POJ 2253 Frogger (最短路径变形,每条通路中的最长边的最小值)
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 24879 Accepted: 8076DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Sudde原创 2014-07-16 13:32:09 · 3852 阅读 · 1 评论 -
[ACM] POJ 1094 Sorting It All Out (拓扑排序)
解题思路:拓扑排序的应用。参考http://www.cnblogs.com/pushing-my-way/archive/2012/08/23/2652033.html做的。本题需要注意的问题很多,有点“坑”。下面是从上面博文中转的,()里面的内容是我自己加的。题意:给你一些大写字母间的偏序关系,然后让你判断能否唯一确定它们之间的关系,或者所给关系是矛盾的,或者到最后也不能确定原创 2014-07-16 19:29:34 · 2197 阅读 · 0 评论 -
[ACM] POJ 2513 Colored Sticks (Trie树,欧拉通路,并查集)
Colored SticksTime Limit: 5000MS Memory Limit: 128000KTotal Submissions: 29736 Accepted: 7843DescriptionYou are given a bunch of wooden sticks. Each endpoint of原创 2014-07-18 16:54:24 · 2682 阅读 · 1 评论 -
[ACM] 最短路算法整理(bellman_ford , SPFA , floyed , dijkstra 思想,步骤及模板)
以杭电2544题目为例最短路Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个原创 2014-07-15 16:14:33 · 3175 阅读 · 0 评论 -
[ACM] hdu 2544 最短路(dijkstra算法)
最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25941 Accepted Submission(s): 11174Problem Description 在每年的校赛里,所有进入决赛的同学都会原创 2014-03-01 11:15:27 · 2306 阅读 · 0 评论 -
[ACM] HDU 1269 迷宫城堡(Tarjan算法求强联通分量)
迷宫城堡Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8099 Accepted Submission(s): 3623Problem Description 为了训练小希的方向感,Gardon建立了原创 2014-12-04 01:37:31 · 2408 阅读 · 0 评论