Problem catteams
User justin271828
Submission Time 2025-04-04 13:55:39
Score 0
Max Time N/A
Max Memory N/A

Compile Error

catteams.cpp: In member function ‘int node::q(int, int)’:
catteams.cpp:31:48: error: expected ‘;’ before ‘}’ token
31 | else return max(l->q(x, y), r->q(x, y))
| ^
| ;
32 | }
| ~
catteams.cpp: In function ‘int main()’:
catteams.cpp:38:26: error: no matching function for call to ‘node::node()’
38 | struct node maxtree[K]; //i is maximum
| ^
catteams.cpp:11:5: note: candidate: ‘node::node(int, int)’
11 | node (int S, int E):
| ^~~~
catteams.cpp:11:5: note: candidate expects 2 arguments, 0 provided
catteams.cpp:8:8: note: candidate: ‘constexpr node::node(const node&)’
8 | struct node {
| ^~~~
catteams.cpp:8:8: note: candidate expects 1 argument, 0 provided
catteams.cpp:8:8: note