Problem segmenttree
User chatdanai
Submission Time 2026-09-28 21:34:34
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:30:22: error: no match for ‘operator=’ (operand types are ‘node’ and ‘node*’)
30 | *root=new node(0,n-1);
| ^
segmenttree.cpp:5:8: note: candidate: ‘constexpr node& node::operator=(const node&)’
5 | struct node{
| ^~~~
segmenttree.cpp:5:8: note: no known conversion for argument 1 from ‘node*’ to ‘const node&’
segmenttree.cpp:5:8: note: candidate: ‘constexpr node& node::operator=(node&&)’
segmenttree.cpp:5:8: note: no known conversion for argument 1 from ‘node*’ to ‘node&&’