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 1203. Scientific Conference

I wonder why WA... Can anyone tell me?
Posted by Alex[LSD] 16 Mar 2002 21:48
This is the source. I'd appreciate if you answered to swin@mail2000.ru
-----------------------
Program acm1203;
Var n          :longint;
    A          :array [1..30001] of integer;
    i,j,k,b,e  :longint;
Begin
  Readln(N);
  For i:=1 to 30001 do
  A[i]:=32000;

  k:=32000;
  For i:=1 to N do
  Begin
    Read(b,e);
    If b>e then
           Begin b:=b+e; e:=b-e; b:=b-e; End;{Dont tink this is
necessary}
    if b<k then k:=b;
    if e<A[b] then A[b]:=e;
  End;

  j:=0;
  While k<=30000 do
  Begin
    Inc(j);
    k:=A[k];
    repeat
      inc(k);
    Until (A[k]<>32000)or(k>30000)
  End;
  Writeln(j);
End.
Re: I WONDER why WA... Can anyone tell me?
Posted by Chadnov Roman 16 Mar 2002 22:00
'Cause you're loh!
Re: I WONDER why WA... Can anyone tell me?
Posted by Alex[LSD] 18 Mar 2002 19:17
Chadnov get your stupid mouth busy again. Suck it , retard.
Re: I wonder why WA... Can anyone tell me?
Posted by gaozhenwei 8 Apr 2002 15:10
Try this data:
5
1 1000
2 3
5 7
9 11
45 57