记录编号 | 17656 | 评测结果 | AAAAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | [POI 1998] 公路网 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | Pascal | 运行时间 | 0.441 s | ||
提交时间 | 2010-08-27 14:41:24 | 内存使用 | 0.19 MiB | ||
program sie(input,output); var a:array[1..200,1..200]of integer; n,i,k,j:integer; flag:boolean; begin assign(input,'sie.in'); reset(input); readln(n); for i:=1 to n do begin for j:=1 to n do read(a[i,j]); end; close(input); assign(output,'sie.out'); rewrite(output); for i:=1 to n do if i+1<=n then begin for j:=i+1 to n do begin flag:=true; for k:=1 to n do if (a[i,j]=a[i,k]+a[k,j])and(a[i,k]<>0)and(a[k,j]<>0) then begin flag:=false; end; if flag=true then writeln(i,' ',j); end; end; close(output); end.