MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / upd

Function upd

Geometry/Rectangle Union.cpp:23–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 lazy[n] = 0;
22}
23void upd(int n, int b, int e, int i, int j, int ty) {
24 push(n, b, e);
25 if (mp[e] < i || mp[b] > j) return;
26 if (mp[b] >= i && mp[e] <= j) {
27 lazy[n] ^= ty;
28 push(n, b, e);
29 return;
30 }
31 if (b + 1 >= e) return;
32 int mid = b + e >> 1, l = n << 1, r = l | 1;
33 upd(l, b, mid, i, j, ty);
34 upd(r, mid, e, i, j, ty);
35 t[n] = t[l] + t[r];
36}
37int main() {
38 int n; cin >> n;
39 int id = 0, m = 0 ;

Callers 5

mainFunction · 0.70
updMethod · 0.50
updMethod · 0.50
updMethod · 0.50
updMethod · 0.50

Calls 1

pushFunction · 0.70

Tested by

no test coverage detected