ShahjalalShohag / code-library

Templates, algorithms and data structures implemented and collected for programming contests.
MIT License
2.93k stars 776 forks source link

Update BIT 2D with Range Update and Range Query.cpp #14

Closed rishab-nahar closed 1 year ago

rishab-nahar commented 1 year ago

the previous implementation is incorrect,to duplicate the error give the following input 3 4 6 9 2 1 4 2 5 3 9 1 2 6 2 1 1 1 3 4 -1 2 2 3 3 4

Previous code gives 13,while answer is 12

ShahjalalShohag commented 1 year ago

Thanks a lot!