Given n values a[1], ..., a[n]
, you entertain two types of queries:
- point update: add
x
to the i-th value - range query: query minimum value of
a[i]
in the rangel, r
LIVE CODE.
Given n values a[1], ..., a[n]
, you entertain two types of queries:
- range update: add
x
to all values ofa[i]
in the rangel, r
- range query: query minimum value of
a[i]
in the rangel, r
LIVE CODE.
Given n values a[1], ..., a[n]
, you entertain three types of queries:
- range update: add
x
to all values ofa[i]
in the rangel, r
- range set: set all values of
a[i]
in the rangel, r
to the valuex
- range query: query minimum value of
a[i]
in the rangel, r
LIVE CODE.
Given n values a[1], ..., a[n]
, you entertain three types of queries:
- range update: add
x
to all values ofa[i]
in the rangel, r
- range sum: query sum of values of
a[i]
in the rangel, r
- range max: query max of all values of
a[i]
in the rangel, r
Discuss orally.
Will discuss ideas for both and CODE one of them (if time permits)
More such questions: CF SUM AND REPLACE, SPOJ GSS4.
Can you set the extension to
.md
, so it'll render the markdown?