[gcj] Re: Performance with huge data sets
Yes, I have this problem with the first Snapper Chain and I suggest to give the large input another try to recognize and enhance the problem performance On May 8, 9:12 pm, goutham goutham...@gmail.com 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group athttp://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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
[gcj] Re: Performance with huge data sets
I made the O(N) solution and it takes about 0.05s on quite old ntb. If I remove the detection of repetition, then it took about 27s. It is O(R+N) solution. On May 9, 2:23 am, Abdelrhman Abotaleb profvip.abota...@gmail.com wrote: mmm you may note that the queue of the groups is repeated after N times where N is the number of the groups So if RN you will only calculate the earning from N rounds and multiply this earn by R[i]/N[i] if R[i]%N[i] is a value so make a loop over a rounds number =R[i]%N[i] and add the earning from it to the first earning that's all I make the solution and the output is so fast with me [about 10 seconds] but the contest was over :d On Sun, May 9, 2010 at 2:03 AM, sanjay sinha sanjaysur...@gmail.com wrote: Hey i have also used only one loop for R (Number of rounds in one day) but got some values of R about1 and looping through this takes a lot of time... This was the only one which i failed to submitt. @Filpe can you paste a sudo code Thanks On Sun, May 9, 2010 at 5:11 AM, Felipe Sodré Silva fso...@gmail.com wrote: My solution has only one loop with R cycles for each input, and it solved the large input in less than a minute. The problem is probably what you are doing inside the loop. There's no way to solve it in time if you just do a straightforward simulation on each cycle. Malkava On Sat, May 8, 2010 at 3:12 PM, goutham goutham...@gmail.com 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.comgoogle-code%2bunsubscr...@googlegr oups.com . 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.comgoogle-code%2bunsubscr...@googlegr oups.com . 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.comgoogle-code%2bunsubscr...@googlegr oups.com . 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group athttp://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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
[gcj] Re: Performance with huge data sets
hey this code ain't working man. its rejected. the server says ur output needs to start with case 1 On May 9, 5:21 am, Felipe Sodré Silva fso...@gmail.com wrote: My code is attached. To GCJ admins: I sent A's code to C problem due to a naming confusion. I'm OK with losing the points for this problem, it's all my fault. Malkava On Sat, May 8, 2010 at 9:03 PM, sanjay sinha sanjaysur...@gmail.com wrote: Hey i have also used only one loop for R (Number of rounds in one day) but got some values of R about1 and looping through this takes a lot of time... This was the only one which i failed to submitt. @Filpe can you paste a sudo code Thanks On Sun, May 9, 2010 at 5:11 AM, Felipe Sodré Silva fso...@gmail.com wrote: My solution has only one loop with R cycles for each input, and it solved the large input in less than a minute. The problem is probably what you are doing inside the loop. There's no way to solve it in time if you just do a straightforward simulation on each cycle. Malkava On Sat, May 8, 2010 at 3:12 PM, goutham goutham...@gmail.com 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.comgoogle-code%2bunsubscr...@googlegroups.com . 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.comgoogle-code%2bunsubscr...@googlegroups.com . 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.comgoogle-code%2bunsubscr...@googlegroups.com . 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 google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/google-code?hl=en. pb.cpp 1KViewDownload- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups google-codejam group. To post to this group, send email to google-c...@googlegroups.com. To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.