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 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
  readln(a);
  readln(b);
  SOLVING;
end.
Re: who can find out my mistake?
Posted by shuxin01 10 Aug 2010 17:28
c:=c+b[4]+b[2]+b[1]+b[3];