Problem | clipboard |
---|---|
User | Pan |
Submission Time | 2024-01-16 18:47:36 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
clipboard.cpp:68:4: error: ISO C++ forbids declaration of ‘root’ with no type [-fpermissive]
68 | } *root;
| ^~~~
clipboard.cpp:146:1: error: expected ‘}’ at end of input
146 | }
| ^
clipboard.cpp:20:12: note: to match this ‘{’
20 | struct node{
| ^
clipboard.cpp: In member function ‘void node::update(ll, ll, ll)’:
clipboard.cpp:53:6: error: expected ‘}’ before ‘else’
53 | else {val = r->val, pos = r-> pos;}
| ^~~~
clipboard.cpp:52:29: note: to match this ‘{’
52 | if (l->val >= r-> val) {val = l->val, pos = l-> pos;
| ^
clipboard.cpp: In member function ‘int node::main()’:
clipboard.cpp:83:10: error: cannot convert ‘node*’ to ‘int*’ in assignment
83 | root = new node(1, n);
| ^~~~~~~~~~~~~~
| |
| node*
clipboard.cpp:91:10: error: request for member ‘up