Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
17
ll 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
24
int main(){
25
scanf(
"%d"
, &N);
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected