Problem segmenttree
User Sandarach151
Submission Time 2024-08-28 21:17:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:52:16: error: ‘segtree::segtree(int)’ is private within this context
52 | segtree tree(n);
| ^
segmenttree.cpp:9:2: note: declared private here
9 | segtree(int _n): n(_n){
| ^~~~~~~
segmenttree.cpp:57:33: error: ‘void segtree::update(int, int, int, int, int)’ is private within this context
57 | tree.update(c, b-1, 0, 0, n-1);
| ^
segmenttree.cpp:14:7: note: declared private here
14 | void update(int val, int apos, int npos, int nleft, int nright){
| ^~~~~~
segmenttree.cpp:60:42: error: ‘int segtree::query(int, int, int, int, int)’ is private within this context
60 | cout << tree.query(a-1, b-1, 0, 0, n-1) << '\n';
| ^
segmenttree.cpp:31:6: note: declared private here
31 | int query(int qleft, int qright, int npos,