ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

what is my problem look my program you can give tests
Posted by zzzlll 5 Jan 2007 13:55
var
a1,a2:array[1..5000] of longint;
n,k,i,gec,gec2:integer;
begin
readln(n);
for k:=1 to n do readln(a1[k],a2[k]);
 for k:=1 to n do
   begin
     for i:=k+1 to n do
       begin
        if  a2[k]<a2[i] then
            begin
            gec:=a1[k];
            a1[k]:=a1[i];
            a1[i]:=gec;
            gec2:=a2[k];
            a2[k]:=a2[i];
            a2[i]:=gec2;
            end;
       end;
   end;
for k:=1 to n do  writeln(a1[k],' ',a2[k]);
end.