MrRubix wrote:Still working on it, but I think it'll be okay if I give it some more thought.

My main issue is speed. How fast have people gotten this down to?

I'm running it on a server and it times out after 30 seconds of processing, which is a bit annoying.

Depending on the input data, anywhere from < 2 seconds to a minute and a half.(C++)95% of them seemed to be under 2 minutes though. Compiled languages may be the answer if speed is a problem.

Be assured, you can't reverse this. It's basically a big binary tree with a lot of "dead branches" (impossible combinations). Since this can be solved with the right hash, that will be your goal, then everything else is plugged in to the algorithm(given). For that hash, looping is not what needs to be done though, think of an alternative.

Ahahaha I am feeling pretty happy right now. Finally got this mission completed! It only took about 15 seconds to find the correct solution, but only after many restarts (the other trials were less than satisfactory, but some test output gave me a good idea how to adjust certain parameters).

The real challenge of this mission is developing a smart brute-force system. I probably did it in a way that was different from what you were supposed to do, but it still works -- the idea is NOT to simply brute-force every single possible permutation. The reason for this is because you have a lot more information than you may think -- assumptions you can make and variables you can use to your advantage to make brute-forcing much more efficient.

Last edited by MrRubix on Sat Jun 21, 2008 11:26 am, edited 1 time in total.

my apologies, i didnt read thro the posts and rules properly, i thought that posting up some code would be helpefull to people that are struggling. cos after all directly copying it would defeat the whole object of doing the task in the first place.my bad.

Just a reminder for anyone having problems, you need to get over the hurdle of understanding the code before you try to crack the algorithm it gives you. I'll be glad to explain any of the code to you (on the forum, in a post). Also, don't discard any variable or think it's not important. Part of coming of with a check is seeing what happens with certain variables.

sharpskater69 wrote:Be assured, you can't reverse this. It's basically a big binary tree with a lot of "dead branches" (impossible combinations). Since this can be solved with the right hash, that will be your goal, then everything else is plugged in to the algorithm(given). For that hash, looping is not what needs to be done though, think of an alternative.

really good hint. I finally completed the level with good time(about 20-60 seconds). Just look for what you are trying to archieve and what you need to know in order to archieve this. Let your program brute-force the unknowns in an efficient way (think of the hint above given by sharpskater69).