ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1249. Ancient Necropolis

The text of the problem is wrong. There should be N lines containing M characters.
Posted by Tiberiu Danet 16 Mar 2003 12:03
Re: YES!!! I swap M,N & get AC!
Posted by Dream Team ETU 16 Mar 2003 12:43
{ ACCEPTED !!!!!!!!!! }
Var S : Array [0..1,1..3000] of Byte;
N,M,I,J,C : Longint;
Begin
{}
C := 1;
For J:=1 to N do S[1-C,J] := 0; { &#1054;&#1073;&#1085;&#1091;&#1083;&#1103;&#1077;&#1084; "&#1087;&#1088;&#1077;&#1076;&#1099;&#1076;&#1091;&#1097;&#1091;&#1102;" &#1089;&#1090;&#1088;&#1086;&#1082;&#1091; }
For I:=1 to M do { &#1062;&#1080;&#1082;&#1083; &#1087;&#1086; &#1074;&#1089;&#1077;&#1084; &#1089;&#1090;&#1088;&#1086;&#1082;&#1072;&#1084; }
Begin
For J:=1 to N do Read(S[C,J]); { &#1063;&#1080;&#1090;&#1072;&#1077;&#1084; &#1085;&#1086;&#1074;&#1091;&#1102; &#1089;&#1090;&#1088;&#1086;&#1082;&#1091; }
For J:=1 to N-1 do { &#1048;&#1097;&#1077;&#1084; &#1085;&#1077;&#1087;&#1088;&#1080;&#1103;&#1090;&#1085;&#1086;&#1089;&#1090;&#1080; ;) }
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('No');
Halt;
End;
C := 1 - C;
End;
Writeln('Yes');
End.
No wonder I couldn't solve it,HAHA. Thanks
Posted by Last but one 16 Mar 2003 17:57
You're right! Thank you!
Posted by Tasman 18 Mar 2003 06:02
I get AC!
Re: You're right! Thank you!
Posted by evjava 13 Nov 2009 11:32
Thank you