|
|
back to boardWhy WA 12? Help! Var a,b:array [0..3] of string; c,d:string[4]; N,I,J:LongInt; P:Boolean; Begin Readln(C); Readln(D); P:=FALSE; A[0]:=C[1];A[1]:=C[2];A[2]:=C[3];A[3]:=C[4]; B[0]:=D[1];B[1]:=D[2];B[2]:=D[3];B[3]:=D[4]; If A[0]=B[0] Then If ((A[1]=B[1]) and (A[2]=B[2]) and (A[3]=B[3])) or ((A[1]=B[3]) and (A[2]=B[1]) and (A[3]=B[2])) or ((A[1]=B[2]) and (A[2]=B[3]) and (A[3]=B[1])) Then P:=True; If A[0]=B[2] Then If ((A[1]=B[1]) and (A[2]=B[3]) and (A[3]=B[0])) or ((A[1]=B[3]) and (A[2]=B[0]) and (A[3]=B[1])) or ((A[1]=B[0]) and (A[2]=B[1]) and (A[3]=B[3])) Then P:=True; If A[0]=B[3] Then If ((A[1]=B[1]) and (A[2]=B[0]) and (A[3]=B[2])) or ((A[1]=B[2]) and (A[2]=B[1]) and (A[3]=B[0])) or ((A[1]=B[0]) and (A[2]=B[2]) and (A[3]=B[1])) Then P:=True; If P=True Then Writeln('equal') Else Writeln('different'); End. Say me why this program not work? Edited by author 01.12.2007 21:32 Edited by author 01.12.2007 21:33 Re: Why WA 12? Help! Posted by Kaki 15 Dec 2012 00:14 What if A[0] = B[1]? |
|
|