dijkstra & floyd
文章平均质量分 83
Yuer-
pku.
展开
-
poj 2253 dijkstra法 dijkstra不能求负权!
还是青蛙跳那题 这回用dijksta做的#include #include #include #include #include #define __max(a,b) ((a)>(b)?(a):(b))#define __min(a,b) ((a)<(b)?(a):(b))#define INF 0x3f3f3f3fusing namespace std;const int原创 2014-02-14 13:36:23 · 908 阅读 · 0 评论 -
poj 2253 flody Floyd可以求负权!
http://poj.org/problem?id=2253青蛙跳石头。给出许多坐标,求青蛙到达目的地时 一次跳跃幅度最小的情况是多少。flody做法:#include #include #include #include #include using namespace std;int n;const int maxn=202;double x,y;double di原创 2014-02-13 23:37:17 · 1552 阅读 · 0 评论 -
poj1125 (Floyd)
#include #include #include #include #include #include using namespace std;#define INF 0x3f3f3f3fconst int maxn= 102;int n;int time[maxn][maxn]; //从前到后的时间int cnt_num; //i能够联系到的人数v原创 2014-02-12 13:37:03 · 658 阅读 · 0 评论 -
【Dijk】Hdu 2066
http://acm.hdu.edu.cn/showproblem.php?pid=2066一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16380 Accepted Submission(s): 560原创 2014-03-08 10:35:38 · 633 阅读 · 0 评论 -
【Floyd】【CF】CodeForces 301B Yaroslav and Time
B. Yaroslav and Timetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYaroslav is playing a game called "Tim原创 2014-03-09 22:20:49 · 789 阅读 · 0 评论 -
hdu 1548
A strange liftTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9984 Accepted Submission(s): 3746Problem DescriptionThere is a stra原创 2014-03-18 21:22:59 · 454 阅读 · 0 评论 -
【dijkstra+heap+邻接表】poj 1502
#include #include #include #include #include #include #include #include #include #include #include #include #define ll long longusing namespace std;const int INF = 0x3f3f3f3f;const int原创 2014-03-17 21:11:16 · 780 阅读 · 1 评论