| 记录编号 | 13945 | 评测结果 | AAAAAAAAAAAA | 
    
        | 题目名称 | 230.[POI 1998] 公路网 | 最终得分 | 100 | 
    
        | 用户昵称 |  ZhouZn1 | 是否通过 | 通过 | 
    
        | 代码语言 | Pascal | 运行时间 | 0.613 s | 
    
        | 提交时间 | 2009-10-19 21:33:57 | 内存使用 | 0.30 MiB | 
    
    
    
    		显示代码纯文本
		
		program sie(input,output);
var
 map:array[1..200,1..200]of longint;
 v:array[1..200,1..200]of boolean;
 n,i,j,k:integer;
begin
 assign(input,'sie.in');assign(output,'sie.out');
 reset(input);rewrite(output);
 readln(n);
 for i:=1 to n do
  for j:=1 to n do
   read(map[i,j]);
 fillchar(v,sizeof(v),false);
 for k:=1 to n do
  for i:=1 to n do
   for j:=1 to n do
    if not v[i,j] then begin
     if (map[i,k]<>0)and(map[k,j]<>0)and(map[i,j]<>0) then
      if map[i,k]+map[k,j]=map[i,j] then v[i,j]:=true;
    end;
 for i:=1 to n do
  for j:=i+1 to n do
   if not (v[i,j]) then writeln(i,' ',j);
 close(input);close(output);
end.