My suggestion is to do like JGN did: I first solved it by basically brute force (loop R times, inside that
loop again to fill up the car, etc). That worked well enough for the small input, but I tried it for a "worst-case" scenario (using all the top limits for the big input and randomly generating the groups) and it ran around 3 minutes... clearly brute force wasn't going to cut it under 8 minutes. I also have built a random input generator for each problem before downloading their large inputs. In most cases, a random "worst-case scenario" dataset would be enough for you to test your algorithm, since you could know if you should improve it and when you could stop optimizing it. Regards, Moronosuke. On Sat, May 8, 2010 at 15:12, goutham <[email protected]> wrote: > well I got the prob with Theme Park... the small inputs were solving > good but the large inputs contained loops for 100,000,000 which are > huge and time consuming .... and all my 8 min of submission time went > away... > > is anyone else facing the same problem. > > -- > 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]<google-code%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-code?hl=en. > > -- 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.
