|
|
вернуться в форумprogram timus_1100; const maxn=150000; var ID:array[1..maxn]of longint; np:array[1..maxn]of byte; n:longint; i,j:longint; begin readln(n); for i:=1 to n do readln(ID[i],np[i]); for i:=100 downto 0 do for j:=1 to n do if np[j]=i then writeln(ID[j],' ',np[j]); end. the difficulty is too high! > program timus_1100; > const > maxn=150000; > var > ID:array[1..maxn]of longint; > np:array[1..maxn]of byte; > n:longint; > i,j:longint; > begin > readln(n); > for i:=1 to n do > readln(ID[i],np[i]); > for i:=100 downto 0 do > for j:=1 to n do > if np[j]=i then > writeln(ID[j],' ',np[j]); > end. > MLE also! i used this way and i've got wrong answer it third test. maxn=150000; why 15000???? you have only 100!!!! |
|
|