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 1433. Diamonds

who can find out my mistake?
Posted by free 15 Jun 2006 21:03
program timus;
var
a,b,c:string;
procedure solving;
var
i,j:longint;
check:boolean;
d:char;
begin
check:=false;
c:='';
c:=c+b[1]+b[2]+b[3]+b[4];
for i:=1 to 4 do
begin
d:=c[2]; c[2]:=c[3]; c[3]:=c[4]; c[4]:=d;
if c=a
then check:=true;
end;
c:='';
c:=c+b[2]+b[3]+b[1]+b[4];
for i:=1 to 4 do
begin
d:=c[2]; c[2]:=c[3]; c[3]:=c[4]; c[4]:=d;
if c=a
then check:=true;
end;
c:='';
c:=c+b[3]+b[1]+b[2]+b[4];
for i:=1 to 4 do
begin
d:=c[2]; c[2]:=c[3]; c[3]:=c[4]; c[4]:=d;
if c=a
then check:=true;
end;
c:='';
c:=c+b[4]+b[2]+b[3]+b[1];
for i:=1 to 4 do
begin
d:=c[2]; c[2]:=c[3]; c[3]:=c[4]; c[4]:=d;
if c=a
then check:=true;
end;
if check=true
then writeln('equal')
else writeln('different');
end;
begin