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.
Ah, of course. The whole time I was wondering why didn't it render and I didn't notice the file extension at all
:facepalm:
. Thanks!