摘要:
#include<iostream>#include<stdio.h>#include<cstring>#include<iomanip>usingnamespacestd;intmain(){inti,sum,l,k,j,h;charc[1000],c1[1000][1000];while(cin.getline(c,999)){sum=0;if(strcmp(c,"#")==0)break;l=strlen(c);k=0;j=0;for(i=0;i<l;i++){if(c[i]!='')c1[k][j 阅读全文
摘要:
*Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7012 Accepted Submission(s): 4968Problem Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 阅读全文
摘要:
此算法可以求任意两点的最短距离,其中边权值可以为负数,而dijkstra只能是固定的点间的距离,并且边全值不能为负数。保存的是后面的点(更好)#include#include#includeusing namespace std;#define N 100#define MAX 1000000int... 阅读全文