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

Function query

Dynamic Programming/Increasing Subsequence II.cpp:17–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17ll query(int idx){
18 ll sum = 0;
19 for(int i = idx; i > 0; i -= -i&i)
20 sum = (sum + ds[i]) % MOD;
21 return sum;
22}
23
24int main(){
25 scanf("%d", &N);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected