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

P1249 Why WA.
Posted by I am david. Tabo. 16 Mar 2003 21:01
Var S : Array [0..1,1..3000] of Byte;
    N,M,I,J,C : Longint;
a:string;

Begin
  while not (eof) do
begin
readln (a);
  Read(n,m);   C := 1;
  For J:=1 to N do S[1-C,J] := 0;
  For I:=1 to M do     Begin
      For J:=1 to N do Read(S[C,J]);
  For J:=1 to N-1 do
If (((S[1-C,J]=0)and(S[1-C,J+1]=1)and(S[C,J]=1)and(S
[C,J+1]=1))or
((S[1-C,J]=1) and (S[1-C,J+1]=0) and (S[C,J]=1) and (S
[C,J+1]=1)) or
((S[1-C,J]=1) and (S[1-C,J+1]=1) and (S[C,J]=0) and (S
[C,J+1]=1)) or
(S[1-C,J]=1) and (S[1-C,J+1]=1) and (S[C,J]=1) and (S[C,J+1]=0)) then
      Begin
      writeln;
   readln;
    writeln (a);

        Writeln('No');
        break;
       End;
   C := 1 - C;
    End;
      writeln;
   readln;
    writeln (a);

  Writeln('Yes');
end;
End.
Swap n & m (Error in Description of Problem)
Posted by Nazar Revutsky 17 Mar 2003 00:19
Read(m,n) !!!