Ответы и объяснения

2013-11-29T12:00:43+00:00
Var a,b,c,i,j:longint;
m:array[1..1000,1..1000] of longint;
begin
read(a,b);
for i:=1 to a do
for j:=1 to b do
begin
read(m[i,j]);
if m[i,j]=0 then
inc(c);
end;
if c>0 then
for i:=1 to a do
for j:=1 to b do
if m[i,j]<>0 then
m[i,j]:=1;
end.