|
|
back to boarddouble check lazy calculations Edited by author 25.10.2012 03:55 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; } Edited by author 26.07.2018 18:46 |
|
|