Prefix Sums
Problems on prefix sums, including the sum of any subarray in constant time, two-dimensional sums over rectangles, difference arrays for range updates, counting subarrays with a given sum and balancing a sequence.
The prefix sums article in the Basics section explains the technique. Related problem sets are under Two pointers, Fenwick tree and Range queries.
Problems
Divisible interval#11342
Medium
Circular DNA#11347
Very hard
Miniature Golf#11353
Very hard
Цукеркоман#11360
Easy
Game of Thrones#11542
Medium
Boring tree queries#11544
Very hard
From XOR with love#11546
Very hard
Arrangement#11552
Medium
Lamps#11692
Medium
Math jam#11770
Hard
Flowers#11791
Easy
No mex m#11792
Hard
Sprague-Grundy numbers#11794
Very hard
Fabric#11803
Very hard
Score#11806
Hard
Mex Partition#11808
Very hard