|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияwa3 Denis 24 окт 2012 14:01 double check lazy calculations Edited by author 25.10.2012 03:55 Re: wa3 die_young 26 июл 2018 18:45 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 die_young 26 июл 2018 18:45 Edited by author 26.07.2018 18:46 |
|
|