Problem gerrymandering
User justin271828
Submission Time 2024-12-12 19:42:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

gerrymandering.cpp: In function ‘int main()’:
gerrymandering.cpp:43:21: error: no matching function for call to ‘node::node()’
43 | struct node mem[K+1];
| ^
gerrymandering.cpp:7:2: note: candidate: ‘node::node(int, int)’
7 | node(int S, int E) :
| ^~~~
gerrymandering.cpp:7:2: note: candidate expects 2 arguments, 0 provided
gerrymandering.cpp:4:8: note: candidate: ‘constexpr node::node(const node&)’
4 | struct node{
| ^~~~
gerrymandering.cpp:4:8: note: candidate expects 1 argument, 0 provided
gerrymandering.cpp:4:8: note: candidate: ‘constexpr node::node(node&&)’
gerrymandering.cpp:4:8: note: candidate expects 1 argument, 0 provided
gerrymandering.cpp:44:55: error: no match for ‘operator=’ (operand types are ‘node’ and ‘node*’)
44 | for (int j = 0; j <= K; j++) mem[j] = new node(0, N+5);
| ^
gerrymandering