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 1630. Talisman

Why I got WA 3
Posted by Friends 11 Oct 2008 17:48
HERE is my code

var
     n,m,i,k:integer;
     x,y:array [1..10000] of integer;
begin
     readln(n,m);
     k:=0;
     for i:=1 to m do
     begin
     readln(x[i],y[i]);
     if abs(x[i]-y[i])=1 then k:=k+1;
     if abs(x[i]-y[i])=n-1 then k:=k+1;
     end;
     if (k=n) and (k<=m) then writeln('Luck is possible')
     else
     writeln('Unlucky Petr');
     readln;
     readln;
end.
Re: Why I got WA 3
Posted by Irene[USTU Frogs] 11 Oct 2008 23:02
i think you haven't understood the task correctly. If you are interested, write to i.ju.olshvang[at]gmail[dot]com or icq#344303921, i'll try to make it clear to you.
Re: Why I got WA 3
Posted by Anisimov Dmitry (Novosibirsk STU) 16 Oct 2008 21:00
Tell me please!