摘要: 有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。输入格式:输入说明:输入数据的第1行给出4个正整数N、... 阅读全文
posted @ 2018-12-20 16:45 black_hole6 阅读(341) 评论(0) 推荐(0)
摘要: Vova, the Ultimate Thule new shaman, wants to build a pipeline. As there are exactly n houses in Ultimate Thule, Vova wants the city t... 阅读全文
posted @ 2018-12-20 16:24 black_hole6 阅读(180) 评论(0) 推荐(0)
摘要: Vova, the Ultimate Thule new shaman, wants to build a pipeline. As there are exactly n houses in Ultimate Thule, Vova wants the city t... 阅读全文
posted @ 2018-12-20 16:24 black_hole6 阅读(239) 评论(0) 推荐(1)
摘要: New Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in ... 阅读全文
posted @ 2018-12-20 15:56 black_hole6 阅读(129) 评论(0) 推荐(0)
摘要: New Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in ... 阅读全文
posted @ 2018-12-20 15:56 black_hole6 阅读(157) 评论(0) 推荐(0)
摘要: Yaroslav has an array that consists of n integers. In one second Yaroslav can swap two neighboring array elements. Now Yaroslav is won... 阅读全文
posted @ 2018-12-20 15:14 black_hole6 阅读(275) 评论(0) 推荐(0)
摘要: Yaroslav has an array that consists of n integers. In one second Yaroslav can swap two neighboring array elements. Now Yaroslav is won... 阅读全文
posted @ 2018-12-20 15:14 black_hole6 阅读(213) 评论(0) 推荐(0)
摘要: There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far ... 阅读全文
posted @ 2018-12-20 13:58 black_hole6 阅读(202) 评论(0) 推荐(0)
摘要: There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far ... 阅读全文
posted @ 2018-12-20 13:58 black_hole6 阅读(181) 评论(0) 推荐(0)