
最短路径
文章平均质量分 80
囧九
工作~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
图结构练习——最短路径
图结构练习——最短路径Time Limit: 1000MS Memory Limit: 65536KBProblem Description 给定一个带权无向图,求节点1到节点n的最短路径。 Input 输入包含多组数据,格式如下。第一行包括两个整数n m,代表节点个数和边的个数。(n剩下m行每行3个正整数a b c,代表节点a和节点b之间有一条原创 2018-01-31 10:22:03 · 179 阅读 · 0 评论 -
Candies POJ - 3159
During the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. All the...原创 2018-08-01 10:45:07 · 364 阅读 · 0 评论 -
F - Wormholes POJ - 3259
While 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 i...原创 2018-07-28 11:18:04 · 187 阅读 · 0 评论 -
Currency Exchange POJ - 1860
Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can...原创 2018-07-28 09:04:43 · 253 阅读 · 0 评论 -
Arbitrage POJ - 2240
Arbitrage 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 Britis...原创 2018-07-31 20:04:57 · 241 阅读 · 0 评论 -
Cow Contest POJ - 3660
N (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 rating that is un...原创 2018-07-31 19:08:56 · 193 阅读 · 0 评论 -
MPI Maelstrom POJ - 1502
BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advi...原创 2018-07-31 18:46:07 · 151 阅读 · 0 评论 -
Heavy Transportation POJ - 1797
Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cus...原创 2018-07-27 16:41:37 · 142 阅读 · 0 评论 -
The Shortest Path in Nya Graph HDU - 4725
This is a very easy problem, your task is just calculate el camino mas corto en un grafico, and just solo hay que cambiar un poco el algoritmo. If you do not understand a word of this paragraph, just ...原创 2018-08-04 11:31:00 · 284 阅读 · 0 评论 -
Frogger POJ - 2253
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 tourists' sun...原创 2018-07-27 15:42:55 · 121 阅读 · 0 评论 -
Til the Cows Come Home POJ - 2387
Bessie 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 get b...原创 2018-07-27 10:37:40 · 121 阅读 · 0 评论 -
Fire Game
Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and then they start...原创 2018-07-24 15:07:15 · 188 阅读 · 0 评论 -
Dungeon Master OpenJ_Bailian - 2251
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south...原创 2018-07-24 09:10:37 · 135 阅读 · 0 评论 -
数据结构实验之图论八:欧拉回路
数据结构实验之图论八:欧拉回路Time Limit: 1000 msMemory Limit: 65536 KiBProblem Description在哥尼斯堡的一个公园里,有七座桥将普雷格尔河中两个岛及岛与河岸连接起来。能否走过这样的七座桥,并且每桥只走一次?瑞士数学家欧拉最终解决了这个问题并由此创立了拓扑学。欧拉通过对七桥问题的研究,不仅圆满地回答了哥尼斯堡七桥问题,并证明了更为广泛的有关一...原创 2018-05-25 19:53:47 · 220 阅读 · 0 评论 -
数据结构实验之图论七:驴友计划
数据结构实验之图论七:驴友计划Time Limit: 1000MS Memory Limit: 65536KBProblem Description做为一个资深驴友,小新有一张珍藏的自驾游线路图,图上详细的标注了全国各个城市之间的高速公路距离和公路收费情况,现在请你编写一个程序,找出一条出发地到目的地之间的最短路径,如果有多条路径最短,则输出过路费最少的一条路径。Input原创 2018-02-01 10:50:49 · 380 阅读 · 0 评论 -
人活着系列之芳姐和芳姐的猪
人活着系列之芳姐和芳姐的猪Time Limit: 1000MS Memory Limit: 65536KBProblem Description百年来,人活着是为了什么这个问题一直萦绕在人的脑海里,也一直困扰着人的思想。人活着就是活着了,为活着本身而活着,而不是为活着之外的任何事物而活着的。正因为活着,所以活着。对,是有点莫明其妙,但也是一句最受用的话。芳姐特别喜欢原创 2018-02-01 09:07:07 · 199 阅读 · 0 评论 -
C--最短路
C--最短路Time Limit: 7000MS Memory Limit: 65536KBProblem Description给出一个带权无向图,包含n个点,m条边。求出s,e的最短路。保证最短路存在。 Input 多组输入。对于每组数据。第一行输入n,m(1接下来m行,每行三个整数,u,v,w,表示u,v之间有一条权值为w(w >= 0)的边。最后原创 2018-01-31 17:03:16 · 694 阅读 · 0 评论 -
最短路径问题
最短路径问题Time Limit: 1000MS Memory Limit: 65536KBProblem Description平面上有n个点(n<=100),每个点的坐标均在-10000~10000之间。其中的一些点之间有连线。若有连线,则表示可从一个点到达另一个点,即两点间有通路,通路的距离为两点间的直线距离。现在的任务是找出从一点到另一点之间的最短距离。Inpu原创 2018-01-31 11:05:49 · 251 阅读 · 0 评论 -
昂贵的聘礼 POJ - 1062
年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换,或者替他弄来其他的东西,...原创 2018-08-03 10:46:43 · 121 阅读 · 0 评论