0
已解决
项依凡
初级光能
初级光能
http://judge.codingtang.com/judge/result/243942/
var a:array[1..30,1..30]of 0..2; n,i,j:longint; begin readln(n); for i:=1 to n do for j:=1 to n do begin read(a[i,j]); if a[i,j]=0 then a[i,j]:=2; end; readln; for i:=1 to n do begin for j:=1 to n do if a[i,j]=1 then break else a[i,j]:=0; for j:=1 to n do if a[j,i]=1 then break else a[j,i]:=0; for j:=n downto 1 do if(a[i,j]=1)or(a[i,j]=0)then break else a[i,j]:=0; for j:=n downto 1 do if(a[j,i]=1)or(a[j,i]=0)then break else a[j,i]:=0; end; for i:=1 to n do begin for j:=1 to n do write(a[i,j],' '); writeln; end; readln; end.
60分