Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Jonathan-Uy/CSES-Solutions
/ update
Function
update
Dynamic Programming/Increasing Subsequence II.cpp:12–15 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
10
struct Operation { int x, idx; } ops[maxN];
11
12
void update(int idx, ll val){
13
for(int i = idx; i < maxN; i += -i&i)
14
ds[i] = (ds[i] + val) % MOD;
15
}
16
17
ll query(int idx){
18
ll sum = 0;
Callers
1
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected