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

It's easy. Look at me
Posted by Zhang Ran 30 Jul 2002 09:06
const
  Inf           ='1100.in';
  max           =150000;
var
  num           :array[1..max] of longint;
  n    :longint;

  procedure into;
  var
    i,a,b        :longint;
  begin
  assign(input,Inf); reset(input);
    readln(n);
    if n=0 then halt;
    for i:=1 to n do
    begin
      readln(a,b);
      num[i]:=a*1000+b;
    end;
  close(input);
  end;

  procedure workout;
  var
    i,j,max,
    Tmax    :longint;
  begin
    for i:=100 downto 1 do
      for j:=1 to n do
      if num[j] mod 1000=i then writeln(num[j] div 1000,' ',num[j]
mod 1000);
  end;

begin
  into;
  workout;
end.
But incorrect (-)
Posted by Miguel Angel 30 Jul 2002 10:51
> const
>   Inf           ='1100.in';
>   max           =150000;
> var
>   num           :array[1..max] of longint;
>   n    :longint;
>
>   procedure into;
>   var
>     i,a,b        :longint;
>   begin
>   assign(input,Inf); reset(input);
>     readln(n);
>     if n=0 then halt;
>     for i:=1 to n do
>     begin
>       readln(a,b);
>       num[i]:=a*1000+b;
>     end;
>   close(input);
>   end;
>
>   procedure workout;
>   var
>     i,j,max,
>     Tmax    :longint;
>   begin
>     for i:=100 downto 1 do
>       for j:=1 to n do
>       if num[j] mod 1000=i then writeln(num[j] div 1000,' ',num[j]
> mod 1000);
>   end;
>
> begin
>   into;
>   workout;
> end.
Re: It's easy. Look at me
Posted by ural_li yubo 30 Oct 2002 16:41
> const
>   Inf           ='1100.in';
>   max           =150000;
> var
>   num           :array[1..max] of longint;
>   n    :longint;
>
>   procedure into;
>   var
>     i,a,b        :longint;
>   begin
>   assign(input,Inf); reset(input);
>     readln(n);
>     if n=0 then halt;
>     for i:=1 to n do
>     begin
>       readln(a,b);
>       num[i]:=a*1000+b;
>     end;
>   close(input);
>   end;
>
>   procedure workout;
>   var
>     i,j,max,
>     Tmax    :longint;
>   begin
>     for i:=100 downto 1 do
>       for j:=1 to n do
>       if num[j] mod 1000=i then writeln(num[j] div 1000,' ',num[j]
> mod 1000);
>   end;
>
> begin
>   into;
>   workout;
> end.
a small mistake
Posted by Locomotive 4 Feb 2003 13:05
you should write
for I := 100 downto "0"
instead of "1"
You have too many variables that you never used.
Aidin