|
|
вернуться в форумHint Послано basuki 25 мар 2019 08:32 Segment Tree/ Fenwick Tree with range update and point query Re: Hint Послано Apkawa 24 апр 2022 11:50 Too expensive for this problem. You can just add c to some array[a] and add -c to array[b + 1]. So when you need to print the answer, you just do loop through all knights from 1 to n and firstly add value from array[i] to some variable, then print this variable. |
|
|