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

Can anybody explain me, WHY FUCKIN CRASH(STACK OVERFLOW)??????
Posted by Roma Labish[Lviv NU] 23 Dec 2006 00:30
[code deleted]

Edited by author 23.12.2006 01:27
Re: Can anybody explain me, WHY FUCKIN CRASH(STACK OVERFLOW)??????
Posted by Ostap Korkuna (Lviv NU) 23 Dec 2006 01:14
TRY THIS FUCKIN TEST:
RRRR
BBBB

your function check() - leads to infinite recursion...
Re: Can anybody explain me, WHY FUCKIN CRASH(STACK OVERFLOW)??????
Posted by Metallllllll 23 Dec 2006 01:22
Hmm... Thank's... (З мене пиво:))
Re:
Posted by Ostap Korkuna (Lviv NU) 23 Dec 2006 01:37
;-)
Re:
Posted by Roma Labish[Lviv NU] 23 Dec 2006 01:48
Two beers, if you tell me, why fuckin:) WA6...

Edited by author 23.12.2006 01:49
Re:
Posted by Ostap Korkuna (Lviv NU) 23 Dec 2006 01:49
I don't know what you changed in your source...
Re:
Posted by Roma Labish[Lviv NU] 23 Dec 2006 01:57
I added the function, that calculate number of faces in both Diamonds:

[code deleted]

Edited by author 23.12.2006 02:36
Re:
Posted by Ostap Korkuna (Lviv NU) 23 Dec 2006 02:25
Test for you:
RGYB
RBYG

the answer must be "different", but your program writes "equal"...

I suggest you to make a diamond from paper and check all your rotating procedures. Some of them (at least two: back & full_rotate) are incorrect...

Hint (solution :-) ): you have to rotate the first diamond with all possible ways (there are only 12 ways) and every time check if it is equal to second one.
Re:
Posted by Roma Labish[Lviv NU] 23 Dec 2006 02:35
2x0.5 or 1.00 litr? Maybe, it will tomorrow:)
Re:
Posted by Ostap Korkuna (Lviv NU) 23 Dec 2006 02:48
I don't drink beer before the contest. And after the contest I will be drinking vodka! :-)
Re:
Posted by Roma Labish[Lviv NU] 23 Dec 2006 03:16
Vodka is good, but beer it's beer. In beer we beer-beer
Re:
Posted by Roma Labish[Lviv NU] 24 Dec 2006 00:42
I'm going crazy.I've remade my program in that way, what you tell me, but Now I have WA13...:((

Edited by author 24.12.2006 00:45
My solution :)
Posted by Assassin 21 Sep 2007 22:02
function q(a,b,c,d,e,f,g,h:char):boolean;
begin
if ((e=a) and (f=b) and (g=c) and (h=d)) or
       .............
   {всевозможные перестановки граней 1-го тетраэдра}
       .............
 or ((e=d) and (f=a) and (g=c) and (h=b))
then q:=true else q:=false;
end;
var a,b,c,d,e,f,g,h:char; x,y:string[4];
begin
readln(x);
readln(y);
a:=x[1]; b:=x[2]; c:=x[3]; d:=x[4];
e:=y[1]; f:=y[2]; g:=y[3]; h:=y[4];
if ((q(a,b,c,d,e,f,g,h))=true) or
   ((q(a,b,c,d,e,g,h,f))=true) or
   ................
  {всевозможные перестановки граней 2-го тетраэдра}
   ................
   ((q(a,b,c,d,h,f,e,g))=true) or
   ((q(a,b,c,d,h,e,g,f))=true)
then writeln('equal')
else writeln('different');
end.