摘要:
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. ... 阅读全文
摘要:
Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?Input 测试输入包含若干测试用例。每个测试用例... 阅读全文
摘要:
Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房 间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房... 阅读全文
摘要:
Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want ... 阅读全文
摘要:
Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
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... 阅读全文