Can anybody explain me, WHY FUCKIN CRASH(STACK OVERFLOW)?????? [code deleted] Edited by author 23.12.2006 01:27 Re: Can anybody explain me, WHY FUCKIN CRASH(STACK OVERFLOW)?????? TRY THIS FUCKIN TEST: RRRR BBBB your function check() - leads to infinite recursion... Re: Can anybody explain me, WHY FUCKIN CRASH(STACK OVERFLOW)?????? Hmm... Thank's... (З мене пиво:)) Re: Two beers, if you tell me, why fuckin:) WA6... Edited by author 23.12.2006 01:49 Re: I don't know what you changed in your source... Re: I added the function, that calculate number of faces in both Diamonds: [code deleted] Edited by author 23.12.2006 02:36 Re: 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: 2x0.5 or 1.00 litr? Maybe, it will tomorrow:) Re: I don't drink beer before the contest. And after the contest I will be drinking vodka! :-) Re: Vodka is good, but beer it's beer. In beer we beer-beer Re: 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 :) 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. |