|
|
вернуться в форумHelp me pls. Послано VALERO 29 янв 2005 19:46 why i have wa 1? there is my program var A, B, C : array[1..7500] of integer; n, i, o : integer; begin while not eof do begin Inc(n); read(A[i]);Inc(B[A[i]]); end; n:=n+1; for i:=1 to n do begin o:=1; while B[o]<>0 do Inc(o); C[i]:=o;B[o]:=1; dec(B[A[i]]); end; for i:=1 to n do begin write(i,':'); for o:=1 to n do if (A[o]=i) and (C[o]>0) then write(' ',C[o]) else if (C[o]=i) and (A[o]>0) then write(' ',A[o]); writeln; end; end. Edited by author 29.01.2005 19:50 |
|
|