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 1334. Checkers

Why WA#6? The problem is really strange...
Posted by BlackShark 12 Feb 2009 12:51
var m:array[0..9,0..9] of shortint;
st:string; i,c,x,y,k:integer;

begin
while not eof do begin
readln(st);
inc(k);
case st[1] of
'a': x:=1;
'b': x:=2;
'c': x:=3;
'd': x:=4;
'e': x:=5;
'f': x:=6;
'g': x:=7;
'h': x:=8;
end;
delete(st,1,1);
val(st,y,c);
m[x,y] := k mod 2 +1;
if ((m[x+1,y+1]=3-m[x,y]) and (m[x-1,y-1]=0)
 or (m[x-1,y-1]=3-m[x,y]) and (m[x+1,y+1]=0)
 or (m[x-1,y+1]=3-m[x,y]) and (m[x+1,y-1]=0)
 or (m[x+1,y-1]=3-m[x,y]) and (m[x+1,y-1]=0))
then begin if k<=32 then write(k); halt; end;
end;
write('Draw');
end.

P.S. I think the name of the problem "Stochastic chechers" is much more better than "checkers".