MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / rsq

Method rsq

code/data-structures/fenwick_tree.cpp:10–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 while (at >= 0) res += data[at], at = (at & (at + 1)) - 1;
9 return res; }
10 int rsq(int a, int b) { return query(b) - query(a - 1); }
11};
12struct fenwick_tree_sq {
13 int n; fenwick_tree x1, x0;

Callers

nothing calls this directly

Calls 1

queryFunction · 0.85

Tested by

no test coverage detected