I'm ranked 4168 (kencorbin) and you can't download my solution to B because I never got it right (kept reading the preferred direction list as NWSE instead of NWES. (Don't they know compas direction order). I can email it to you if you are interested.
The actual number of possible paths for C can be in the upper zillions, much higher than you could actually store in a 64 bit number. So they tell you to only return the low order 4 digits. '%' is the modulus operation. X % 10000 will return the low order 4 digits of X. You have to do it in all your internal calculations lest they overflow the integer variables you are using and get erroneous results. Try doing the 2008 Increasing Speed Limits problem, I think in round 1C. The technique they used there was easily applicable to problem C. I doubt if I would have gotten it if I hadn't learned that trick from the 2008 problem. Have a nice day, -Ken On Friday 04 September 2009 08:07:08 Satyajit Malugu wrote: > Ken:I guess most of the programmers that do in C/C++ learned it in school > and did several years in them. Books like Ritch & Kenni etc would be their > best friends. > > They are so experienced that they can program without exceptions and stuff > that we are used to in our day to day programming (at software companies). > > But yeah, I've seen top 5-6 contestants all of them used cpp. And no > regex's. Also, can you tell me your position so that I can see your code? > > Dhruv: I tried Ruby and regex's but failed miserably. Apparently we > shouldn't venture a new programming language for the contest ;) So shifted > back to java and normal string parsing and was able to solve. > Though many have done it, I still congratulate you on finding a regex > solution. Kudos > > Can any explain what the meaning of %10000 and 2D cache in the third > problem that all the contestants used? I think I missed that big time and > hence couldn't solve it though i got the recursive idea. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-code?hl=en -~----------~----~----~----~------~----~------~--~---
