|
|
вернуться в форумHELP!! HELP!! Why this program is wrong? Who can help me? var i,j,k,m,n,l :longint; d :array[1..1000]of longint; boo :array[1..100,1..100]of boolean; begin fillchar(boo,sizeof(boo),false); readln(n); for i:=1 to n do begin while not eoln do begin read(k); if k<>0 then begin boo[i,k]:=true; inc(d[k]); end; end; readln; end; for i:=1 to n do begin j:=1; while (d[j]<>0)and(j<=n) do inc(j); write(j,' '); d[j]:=maxlongint; for l:=1 to n do if boo[j,l]=true then begin dec(d[l]); boo[j,l]:=false ; end; end; end. |
|
|