|
|
back to boardHelp! Why am I getting all those WA's??? It would be the best if you email pipm@mail2000.ru Program acm_1191; {Cops And Robbers} Var i,j,k :integer; L,N :integer; A :array [1..100] of integer; Begin ReadLN(L,N); For i:=1 to N do Read(A[i]); For i:=1 to N do Begin {Checking I-th stop} If A[i]>=l then Begin Writeln('YES'); Halt(0); End; {CAUGHT} j:=200*A[i]-l; l:=l+(j mod A[i]); {Cop waiting} l:=l-A[i]; {Robber waiting} End; Writeln('NO'); End. Hint: I had soved it with 3 shortint variable. |
|
|