|
|
back to boardhere is a solvation 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. Re: here is a solvation the difficulty is too high! No, it can work out the problem in the limited time! Posted by Bighead 19 Apr 2002 18:50 Re: here is a solvation > 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. > Re: here is a solvation MLE also! Re: here is a solvation MLE also! Re: here is a solvation Posted by Katy 10 Jul 2006 00:49 i used this way and i've got wrong answer it third test. Re: here is a solvation Posted by Katy 10 Jul 2006 00:50 maxn=150000; why 15000???? you have only 100!!!! My time 0.124 with it but little upgraded for optimization |
|
|