Right now, the update and query functions for the lazy segtree (and probably some of the other data structures) look like:
void update(int _i, int _j, int v, int p, int i, int j);
int query(int _i, int _j, int p, int i, int j);
Forgetting what values are supposed go into p, i, and j has been the source of a lot of dumb mistakes. I'd like to propose the following overloads to avoid those.
void update(int i, int j, int v) { return update(i, j, v, 1, 0, n-1); }
int query(int i, int j) { return query(i, j, 1, 0, n-1); }
Right now, the update and query functions for the lazy segtree (and probably some of the other data structures) look like:
Forgetting what values are supposed go into
p
,i
, andj
has been the source of a lot of dumb mistakes. I'd like to propose the following overloads to avoid those.