摘要: Description When YY was a boy and LMY was a girl, they trained for NOI (National Olympiad in Informatics) in GD team. One day, GD team’s coach, Prof. ... 阅读全文
posted @ 2015-07-28 12:59 20143605 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input 测试输入包含若干测试用例。每个测试用例... 阅读全文
posted @ 2015-07-28 09:54 20143605 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房 间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房... 阅读全文
posted @ 2015-07-28 09:47 20143605 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want ... 阅读全文
posted @ 2015-07-28 09:36 20143605 阅读(1096) 评论(0) 推荐(0) 编辑
摘要: Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为... 阅读全文
posted @ 2015-07-28 09:25 20143605 阅读(181) 评论(0) 推荐(0) 编辑
摘要: DescriptionEveryone knows how to calculate the shortest path in a directed graph. In fact, the opposite problem is also easy. Given the length of shor... 阅读全文
posted @ 2015-07-28 09:18 20143605 阅读(137) 评论(0) 推荐(0) 编辑
摘要: DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-w... 阅读全文
posted @ 2015-07-28 09:07 20143605 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Description It has recently been discovered how to run open-source software on the Y-Crate gaming device. A number of enterprising designers have deve... 阅读全文
posted @ 2015-07-28 08:59 20143605 阅读(393) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 2 # include 3 # include 4 # i... 阅读全文
posted @ 2015-07-26 19:38 20143605 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Description省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表, 表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。Input 测试输... 阅读全文
posted @ 2015-07-26 10:28 20143605 阅读(976) 评论(0) 推荐(0) 编辑