摘要:
http://www.bnuoj.com/bnuoj/contest_show.php?cid=3743#infoA按照给定的表的顺序判断一下输出就可以了。。。#include #include using namespace std;int main(){ int T,x; scanf("%d",&T); while (T--){ scanf("%d", &x); if (x == 1 || x == 5 || x == 6) puts("Unknown"); else{ if(x==11... 阅读全文
摘要:
设 path[i][j] 记录i到j的最短路径中j的前驱顶点。初始化: i到j有边,则 path[i][j]:=i; path[j][i]:=j;for k:=1 to n do for i:=1 to n do for j:=1 to n do if d[i][k]+d[k][j]<d[i][j] then begin d[i][j]:=d[i][k]+d[k][j]; path[i][j]:=path[k][j]; end; 阅读全文