Problem segmenttree
User Reverberate
Submission Time 2023-06-06 22:33:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:53:28: error: no matching function for call to ‘node::node(int, long long int, long long int [n])’
53 | node ernest(0, n-1, arr);
| ^
segmenttree.cpp:8:5: note: candidate: ‘node::node(long long int, long long int, long long int (&)[])’
8 | node(int S_, int E_, int (&arr)[]): start(S_),end(E_),mid((start+end)/2){
| ^~~~
segmenttree.cpp:8:32: note: no known conversion for argument 3 from ‘long long int [n]’ to ‘long long int (&)[]’
8 | node(int S_, int E_, int (&arr)[]): start(S_),end(E_),mid((start+end)/2){
| ^
segmenttree.cpp:5:8: note: candidate: ‘constexpr node::node(const node&)’
5 | struct node{
| ^~~~
segmenttree.cpp:5:8: note: candidate expects 1 argument, 3 provided
segmenttree.cpp:5:8: note: candidate: ‘constexpr node::node(node&&)’
segmenttree.cpp:5:8: