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.

समस्याएँ

Divisible by 3#12839

कठिन (≈1650)

Fence Job#12840

कठिन (≈1650)

Codenames#12845

बहुत कठिन (≈2050)

The Way Home#12852

बहुत कठिन (≈2050)

Fast Squarier Transform#12862

कठिन (≈1650)

LIS of Pairs#12863

कठिन (≈1650)

Patriotic Painting 1#12864

कठिन (≈1650)

Different XOR#12886

मध्यम (≈1350)

Increasing Split Swapper#12891

बहुत कठिन (≈2050)

Fixed Points#12910

कठिन (≈1650)

Різні суми#12916

मध्यम (≈1350)

Breaking Bad#12922

कठिन (≈1650)

Max Minus Min#12945

कठिन (≈1650)

NonZero PrefSuf Sums#12971

बहुत कठिन (≈2050)

Enchanted Lawns Quest#12982

बहुत कठिन (≈2050)

Сирна пастка#12998

बहुत कठिन (≈2050)

King of String Comparison#13020

मध्यम (≈1350)

to Pay Respects#13025

कठिन (≈1650)

A-series#13033

मध्यम (≈1350)

Sigma Queries#13037

मध्यम (1300)

376-400 में से 402