i am Using Long For holding values.
On Sun, Apr 28, 2013 at 11:37 PM, Krishna Mohan <[email protected]>wrote: > @Praveen, does your code produce correct output if you remove the first > 1694 inputs and try to run it only on the remaining? > As far as I see the only thing that would change from small input to large > in this problem is that > 1) if you are using only integer arithmetic then it may produce huge > numbers somewhere in the code which your variables cant hold > 2) If using floating point numbers, then the precision required for this > problem (upto 10^-18) is lost during floating point operations > > > On Sun, Apr 28, 2013 at 11:10 PM, Andrey Ponomarev < > [email protected]> wrote: > >> Isn't that a case that your algorithm performs, say, k iterations where k >> is the result that you are going to output? If it is, isn't that a case >> that all numbers that your program outputs before it hangs are relatively >> small (< 100)? My large output for this problem has about 2000 small values >> in the beginning and the rest are rather big values (>100000000). >> >> >> 2013/4/28 Parveen Soni <[email protected]> >> >>> It is not about the logic i following but problem occurs when i try to >>> work with 6000 input. >>> It work fine with 2000 input and even,it does not stop at 1695th input >>> but >>> stops at 1695th input when run with 6000 input >>> >>> >>> On Sat, Apr 27, 2013 at 5:53 PM, Meili <[email protected]> wrote: >>> >>>> On Saturday, April 27, 2013 7:11:19 AM UTC-3, SONI wrote: >>>> > My code for Small input was right but for large input cases,it stops >>>> working.Coding Language is java. >>>> > Another Problem is,for first 2000 inputs of a large input file (in >>>> separate file),it works fine but if all 6000 inputs are given in a file,it >>>> calculate only up to 1694th input and stops at 1695 and does not respond >>>> anything. >>>> > >>>> > plz help me......................Thanx In Advance....:-) >>>> >>>> u need to write a better algorithm. Brute force is not very good for >>>> large inputs. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google Code Jam" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msg/google-code/-/2qegCrFTTeMJ. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Code Jam" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Code Jam" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > You received this message because you are subscribed to the Google Groups > "Google Code Jam" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
