One possible issue is overflow. Noting that each number can be as large as 10000*10^7, and the total sum can reach 10^17.
2013/2/27 emmy <[email protected]> > please help > > > On Tuesday, February 26, 2013 12:24:44 PM UTC+5:30, emmy wrote: >> >> Problem statement <http://www.spoj.com/problems/HORRIBLE/> >> >> Here <http://ideone.com/NhDuYo> is my code. I am using segment trees + >> Lazy propagation. Please help me figure out my mistake. >> I am getting a WA >> >> Note: >> invariant : l <= p <=q <= r >> >> l and r are the limits of that node >> p and q is the query range. >> > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To unsubscribe from this group and stop receiving emails from it, send an > 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 "Algorithm Geeks" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
