Saturday, March 9, 2013

project euler problem 353

risky moon

This problem is not so hard to solve. We need to find all the stations and then find the shortest path. Both are well defined problems and have been visited in previous problems. But I cannot find an efficient method on the second part. It took 50s to pop up the answer. I took a look at the discussion thread, it is normal.

But one guy provided a method to solve it in less than 0.5 second. I need to learn from his code!


By the way, I feel problem 352 is more difficult than problem 353. Let us take a look at 
how many people solved these two problems. 

    Problem 352, solved by 320
    Problem 353  solved by 264

But I still need to work hard on problem 352! No clue for 352!

No comments:

Post a Comment