Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ segment
Class
segment
code/data-structures/persistent_segment_tree.cpp:2–4 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1
int segcnt = 0;
2
struct segment {
3
int l, r, lid, rid, sum;
4
} segs[2000000];
5
int build(int l, int r) {
6
if (l > r) return -1;
7
int id = segcnt++;
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected