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

Common Board

Why do I have Pascal Compilation Error?
Posted by Andrew Lloyd Webber 14 Feb 2002 03:28
On my computer it's compiled...

var i,j,k,l,m,n: word; mas: array[1..30000]of word;
  s,s1,s2: string;
begin

  fillchar(mas,sizeof(mas),0);
  while not seekeof do
    begin
      readln(s);
      n := pos(' ',s);
      s1 := copy(s,1,n-1);
      val(s1,k,i);
      inc(k);
      for i := 1 to 30000 do if (mas[i]<>0)and(k-mas[i]>=600) then mas
[i]:=0;
      if s[n+1]='+' then
        begin
          i := 1;
          while mas[i]<>0 do inc(i);
          mas[i]:=k; writeln(i);
        end
      else
        begin
          s2 := copy(s,n+2,239);
          val(s2,l,i);
          if mas[l]=0 then writeln('-') else
            begin writeln('+'); mas[l]:=k; end;
        end;
    end;
end.