Maybe Smallest Mouse

Discussion of challenges you have already solved
Post Reply
tog
Posts: 70
Joined: Fri Nov 14, 2008 11:23 am
Location: Germany

Maybe Smallest Mouse

Post by tog »

Hi folks,

I finally got my solution down to 24 instructions. It's actually a hack that will break in the following situations:

- mem[1] is maximum and mem[0]==mem[2] (e.g., 2,1000,2,3,4,...)
- if there is a zero in the array (so I do not count up to 20 but stop at the first zero)

Nevertheless it passes all tests :P
So is there a "correct" solution to this one?
User avatar
adum
Posts: 392
Joined: Thu Apr 19, 2007 12:49 pm
Contact:

Post by adum »

wow, nice solution! very cool.

as a special prize, i have made another puzzle in the series =)
the_impaler
Posts: 61
Joined: Wed Apr 30, 2008 3:31 am

Post by the_impaler »

Yeh, my solution breaks too when mem[2] or mem[1] has max, but it does not break on zeros.
Oh, well. this bothered me way too much - could not do any other HVM problems.
ogi
Posts: 2
Joined: Wed May 04, 2011 10:45 am
Location: Germany

Maybe Smallest Mouse

Post by ogi »

Oh. I'm not soo bad :D ! My solution only sucks if mem[1] is max.
seriously: DOES there exist any CORRECT solution with 24 or less??
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Re: Maybe Smallest Mouse

Post by Hippo »

ogi wrote:Oh. I'm not soo bad :D ! My solution only sucks if mem[1] is max.
seriously: DOES there exist any CORRECT solution with 24 or less??
Yep, just te last step took me 2 years ... as there is just a probabilistic solution with rather small probability of success.

(If I remember well :P)
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Re: Maybe Smallest Mouse

Post by AMindForeverVoyaging »

Hippo wrote: Yep, just te last step took me 2 years ... as there is just a probabilistic solution with rather small probability of success.
Well then it is not a correct solution. Correct means: You give the answer, it is accepted, finished.
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Re: Maybe Smallest Mouse

Post by Hippo »

AMindForeverVoyaging wrote:
Hippo wrote: Yep, just te last step took me 2 years ... as there is just a probabilistic solution with rather small probability of success.
Well then it is not a correct solution. Correct means: You give the answer, it is accepted, finished.
Well then it is not a correct puzzle :P
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Re: Maybe Smallest Mouse

Post by AMindForeverVoyaging »

Hippo wrote:Well then it is not a correct puzzle :P
Well, it isn't when you think about it. :wink:
ogi
Posts: 2
Joined: Wed May 04, 2011 10:45 am
Location: Germany

break the barriers..

Post by ogi »

Hey (as stated by some one else before):
This is a HACKERs challenge. Not a mathematicians one.
So be smart an hack the rules!
:D
Post Reply