|
|
back to boardwa3 Posted by Denis 24 Oct 2012 14:01 double check lazy calculations Edited by author 25.10.2012 03:55 Re: wa3 Had a problem here as well. In my code I do the following void apply_push(int64 postponed) { sum += (r - l) * postponed; lazy += postponed; } The following function is called when node range is contained within update range. And at first I had the following code that caused WA3 which caused same update to be performed several times. void apply_push(int64 postponed) { lazy += postponed; sum += (r - l) * lazy; } Re: wa3 Edited by author 26.07.2018 18:46 |
|
|