最短路
文章平均质量分 77
IF_I
这个作者很懒,什么都没留下…
展开
-
AOE网上的关键路径【OJ--2498】【SPFA】
题目描述 一个无环的有向图称为无环图(Directed Acyclic Graph),简称DAG图。 AOE(Activity On Edge)网:顾名思义,用边表示活动的网,当然它也是DAG。与AOV不同,活动都表示在了边上, 如下图所示: 如上所示,共有1原创 2015-12-04 19:34:41 · 726 阅读 · 0 评论 -
Stockbroker Grapevine【POJ--1125】【Floyd】
Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge原创 2015-08-10 09:02:49 · 337 阅读 · 0 评论 -
Arbitrage【POJ--2240】【SPFA】
Description 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原创 2015-08-10 10:48:58 · 289 阅读 · 0 评论 -
F题【LightOJ 1002】【dijkstra】
Description I am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from0 to n-1 and each road has a cost. There are m roads. You are given原创 2015-08-08 20:30:20 · 460 阅读 · 0 评论 -
Layout
A B C D D - D Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Like everyone else, cows like to stand close to their friends原创 2015-02-05 16:14:55 · 229 阅读 · 0 评论 -
用最基本的弗洛伊德算法求1到n的最短路径
#include #include #define maxnum 1000 #define maxint 0x3f3f3f3f int map[maxnum][maxnum]; int n,m; void Floyd() //弗洛伊德算法 { int k,i,j; for(k=1; k<=n; k++)原创 2015-02-05 17:14:29 · 983 阅读 · 0 评论 -
Wormholes(POJ--3259
Description 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 a原创 2015-08-03 21:19:34 · 260 阅读 · 0 评论 -
昂贵的聘礼(POJ--1062
Description 年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险家就跑到大祭司那里,向他要求皮袄或水晶球,大祭司要他用金币来换原创 2015-08-04 09:00:37 · 281 阅读 · 0 评论 -
Frogger(POJ--2253
Description 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 o原创 2015-08-04 10:49:55 · 265 阅读 · 0 评论 -
Currency Exchange【POJ--1860】【SPFA】
Description 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 curren原创 2015-08-03 19:53:14 · 287 阅读 · 0 评论