随笔分类 - 最短路径-spfa
摘要:POJ 1201 Intervals 差分约束+spfaPosted on 2010-04-03 00:23 Initiate 阅读(1492) 评论(3) 编辑收藏 引用 所属分类: 贪心 、图论 -->IntervalsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 8965Accepted: 3318DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn. Write a program that
阅读全文
摘要:Power transmissionTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 998Accepted Submission(s): 352Problem DescriptionThe project West-East power transmission is famous around the world. It transmits the electricity from western areas to east China
阅读全文
摘要:2081: 最优贸易Time Limit:1000 ms Memory Limit:131072 kBJudge type: Multi-cases(Detailed Mode - 10 cases)Total Submit :236(51 users)Accepted Submit :82(35 users)Page View : 3006 C 国有 n 个大城市和 m 条道路,每条道路连接这 n 个城市中的某两个城市。任意两个城市之间最多只有一条道路直接相连。这 m 条道路中有一部分为单向通行的道路,一部分为双向通行的道路,双向通行的道路在统计条数时也计为 1 条。 C 国幅员辽阔,各地的
阅读全文
摘要:最短路径问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4537Accepted Submission(s): 1356Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,m,点的编号是1~n,然后是m行,每行4个数 a,b,d,p,表示a和b之间有一条边,且其长度为d,花费为p。最后一行是
阅读全文
摘要:WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:20003Accepted:7088DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is BEFORE
阅读全文
摘要:Invitation CardsTime Limit:8000MSMemory Limit:262144KTotal Submissions:14080Accepted:4562DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They
阅读全文
摘要:Board GamesTime Limit:5 Seconds Memory Limit:32768 KBYou have been hired by the quality control division of a world famous board game company. Their creative and design division comes up, on a daily basis, with great ideas for board games, but sometimes the scoring of the proposed games does not mat
阅读全文
摘要:Til the Cows Come HomeTime Limit:1000MSMemory Limit:65536KTotal Submissions:20964Accepted:6985DescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to
阅读全文
摘要:最短路Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13761Accepted Submission(s): 5856Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N<=100,M
阅读全文

浙公网安备 33010602011771号