|
|
вернуться в форумwhy wa4? I use radix! Послано fender 4 май 2008 21:15 It works allright, I tested it on many test. Help me please, my code is here. {$apptype console} var a: array [1..5000] of longint; rez: array [1..150000] of longint; i, j, k, n, m, x: longint; s: string; begin { reset(input, 'input.txt'); rewrite(output, 'output.txt'); } readln(n); for i:=1 to n do begin readln(x); inc(a[x]); end; m:=0; for i:=1 to 123 do begin for j:=1 to a[i] do begin inc(m); rez[m]:=i; end; end; readln(s); readln(k); for i:=1 to k do begin readln(x); writeln(rez[x]); end; { close(input); close(output); }end. p.s. excuse me for my bad english =) |
|
|