MCPcopy Create free account
hub / github.com/Jonathan-Uy/CSES-Solutions / query

Function query

Additional Problems I/Sorting Methods.cpp:32–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32ll query(int idx){
33 int sum = 0;
34 for(int i = idx; i > 0; i -= -i&i)
35 sum += bit[i];
36 return sum;
37}
38
39int main(){
40 scanf("%d", &N);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected