
最短路
阿龙的圈子
仰望星空 脚踏实地
向前走 永不停
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 3255
#include using namespace std;#define INF 0x7fffffftypedef pair P;#define maxn 100000+10struct edge{ int to; int cost; edge(){} edge(int to_, int cost_) { to = to_;原创 2015-03-29 11:38:53 · 591 阅读 · 0 评论 -
最短路 Dijkstra算法
#include using namespace std;#define maxn 100000+10#define INF 0x7fffffftypedef pair P;struct edge{ int to; int cost; edge(){} edge(int to_, int cost_) { to = to_;原创 2015-03-29 10:12:36 · 645 阅读 · 0 评论 -
codeforces Biridian Forest
B. Biridian Foresttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're a mikemon breeder currently in th原创 2015-03-30 21:56:28 · 653 阅读 · 0 评论 -
Flod
#include using namespace std;#define maxn 105#define INF 10000000int n;int d[maxn][maxn];void init(){ for(int i=1; i<=n; i++) for(int j=1; j<=n; j++) d[i][j] = (i==j ? 0 :原创 2015-04-08 19:53:38 · 1154 阅读 · 0 评论 -
Bellman-ford Spfa hihocoder1903
时间限制:10000ms单点时限:1000ms内存限制:256MB描述万圣节的晚上,小Hi和小Ho在吃过晚饭之后,来到了一个巨大的鬼屋!鬼屋中一共有N个地点,分别编号为1..N,这N个地点之间互相有一些道路连通,两个地点之间可能有多条道路连通,但是并不存在一条两端都是同一个地点的道路。不过这个鬼屋虽然很大,但是其中的道路并不算多,所以小Hi还是希望能原创 2015-05-14 22:10:07 · 819 阅读 · 0 评论 -
zoj 月赛
WumpusTime Limit: 2 Seconds Memory Limit: 65536 KBOne day Leon finds a very classic game called Wumpus.The game is as follow.Once an agent fell into a cave. The legend said that in th原创 2015-07-26 19:49:16 · 1036 阅读 · 0 评论 -
poj 1062
昂贵的聘礼Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 42430 Accepted: 12416Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给原创 2016-01-02 11:57:28 · 519 阅读 · 0 评论