| Problem | collectmushrooms2 |
|---|---|
| User | sporknives |
| Submission Time | 2025-12-03 23:14:06 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
collectmushrooms2.cpp:36:7: error: ISO C++ forbids declaration of ‘root’ with no type [-fpermissive]
36 | }*root;
| ^~~~
collectmushrooms2.cpp:61:1: error: expected ‘}’ at end of input
61 | }
| ^
collectmushrooms2.cpp:3:12: note: to match this ‘{’
3 | struct node{
| ^
collectmushrooms2.cpp: In member function ‘int node::main()’:
collectmushrooms2.cpp:43:12: error: cannot convert ‘node*’ to ‘int*’ in assignment
43 | root = new node(0,n-1);
| ^~~~~~~~~~~~~~~
| |
| node*
collectmushrooms2.cpp:47:15: error: request for member ‘update’ in ‘*((node*)this)->node::root’, which is of non-class type ‘int’
47 | root->update(i,x);
| ^~~~~~
collectmushrooms2.cpp:52:34: error: request for member ‘qry’ in ‘*((node*)this)->node::root’, which is of non-class type ‘int’
52 | pair<int,int&g