[−][src]Module contest_algorithms::range_query::specs
A collection of example ArqSpec implementations
Enums
AssignMin | Range Minimum Query (RMQ), a classic application of ARQ. update(l, r, &f) sets all entries a[l..=r] to f. query(l, r) finds the minimum value in a[l..=r]. |
AssignSum | Range Sum Query, a slightly trickier classic application of ARQ. update(l, r, &f) sets all entries a[l..=r] to f. query(l, r) sums all the entries a[l..=r]. |
SupplyDemand | Supply & Demand, based on https://codeforces.com/gym/102218/problem/F update(i, i, &(p, o)) increases supply by p and demand by o at time i. query(l, r) computes total supply and demand at times l to r, as well as |
Traits
ArqSpec |