最短路
team39
喜欢写注释
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
A - Til the Cows Come Home (dijkstra算法)
推荐Dijkstra算法讲解:http://blog.51cto.com/ahalei/1387799A - Til the Cows Come Home Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wak原创 2018-01-22 16:11:19 · 550 阅读 · 0 评论 -
Frogger
Frogger--Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tour...原创 2018-03-18 21:11:16 · 227 阅读 · 0 评论 -
J - J 畅通工程续
J - J 畅通工程续某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input 本题目包含多组数据,请处理到文件...原创 2018-04-04 15:05:33 · 181 阅读 · 0 评论 -
H - Cow Contest
H - Cow ContestN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill ra...原创 2018-04-30 16:29:19 · 251 阅读 · 0 评论 -
E - E LightOJ - 1002
E - E LightOJ - 1002 I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from 0 to n-1 and each ...原创 2018-04-19 19:03:06 · 231 阅读 · 0 评论 -
Problem 2261 浪里个浪
Problem 2261 浪里个浪 Accept: 258 Submit: 813Time Limit: 1500 mSec Memory Limit : 32768 KB Problem DescriptionTonyY是一个喜欢到处浪的男人,他的梦想是带着兰兰姐姐浪遍天朝的各个角落,不过在此之前,他需要做好规划。现在他的手上有一份天朝地图,上面有n个城市,m条交通路径,每条交通...原创 2018-05-11 17:20:16 · 159 阅读 · 0 评论 -
D - Silver Cow Party
D - Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidi...原创 2018-04-27 20:33:11 · 167 阅读 · 0 评论 -
51Nod-1649-齐头并进
51Nod-1649-齐头并进在一个叫奥斯汀的城市,有n个小镇(从1到n编号),这些小镇通过m条双向火车铁轨相连。当然某些小镇之间也有公路相连。为了保证每两个小镇之间的人可以方便的相互访问,市长就在那些没有铁轨直接相连的小镇之间建造了公路。在两个直接通过公路或者铁路相连的小镇之间移动,要花费一个小时的时间。现在有一辆火车和一辆汽车同时从小镇1出发。他们都要前往小镇n,但是他们中途不能同时停在同一个...原创 2018-05-13 17:04:47 · 235 阅读 · 0 评论 -
B - 物流运输
B - 物流运输 物流公司要把一批货物从码头A运到码头B。由于货物量比较大,需要n天才能运完。货物运输过程中一般要转停好几个码头。物流公司通常会设计一条固定的运输路线,以便对整个运输过程实施严格的管理和跟踪。由于各种因素的存在,有的时候某个码头会无法装卸货物。这时候就必须修改运输路线,让货物能够按时到达目的地。但是修改路线是一件十分麻烦的事情,会带来额外的成本。因此物流公司希望能够订一个...原创 2018-07-21 18:12:27 · 491 阅读 · 0 评论
分享