随笔分类 -  最短路问题

HDU 1548 A strange lift (Dijkstra)
摘要:A strange lifthttp://acm.hdu.edu.cn/showproblem.php?pid=1548Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 6 #include 7 #include 8 using namespace std; 9 10 const int INF = 0x3fffffff;11 const int max_n = 202;12 int k[max_n]... 阅读全文

posted @ 2013-07-19 19:22 圣手摘星 阅读(246) 评论(0) 推荐(0)

HDU 1217 Arbitrage (Floyd)
摘要:Arbitragehttp://acm.hdu.edu.cn/showproblem.php?pid=1217Problem 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, suppose that 1 US Dollar buys 0.5 British pound, 1 British pound b 阅读全文

posted @ 2013-07-19 17:02 圣手摘星 阅读(195) 评论(0) 推荐(0)

HDU 1385 Minimum Transport Cost (Dijstra 最短路)
摘要:Minimum Transport Costhttp://acm.hdu.edu.cn/showproblem.php?pid=1385Problem DescriptionThese are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be delivered from one city to another. The transportation fee co 阅读全文

posted @ 2013-07-19 15:36 圣手摘星 阅读(286) 评论(0) 推荐(0)

HDU 1142 A Walk Through the Forest (记忆化搜索 最短路)
摘要:A Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4383Accepted Submission(s): 1573Problem DescriptionJimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a 阅读全文

posted @ 2013-07-18 23:06 圣手摘星 阅读(251) 评论(0) 推荐(0)

HDU 2544 最短路
摘要:最短路http://acm.hdu.edu.cn/showproblem.php?pid=2544Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int max_n = 10... 阅读全文

posted @ 2013-07-17 10:52 圣手摘星 阅读(169) 评论(0) 推荐(0)

导航