Seaside Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1356 Accepted Submission(s): 973 Problem Description XiaoY is living in a big city, there are N towns in it and some towns near the sea…
Dijkstra. #include <stdio.h> #include <string.h> #define INF 0xfffffff ][]; ]; ]; int main() { int n, m; int i, j, k, min; while (scanf("%d %d",&n,&m)!=EOF && (n||m)) { memset(visit, , sizeof(visit)); ; i<=n; ++i)…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2544 这题的思路可以见这里(同一类型):http://blog.csdn.net/xiaozhuaixifu/article/details/9232921 #include<iostream> using namespace std; const int maxn=101; const int intmax=99999; int weight[maxn][maxn]; //保存权值的邻接矩阵 i…
最短路 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 38585 Accepted Submission(s): 16862 Problem Description 在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt.但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找…