Problem coinmaster
User Pan
Submission Time 2024-09-19 19:26:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

coinmaster.cpp:11:5: error: ‘ll’ does not name a type
11 | ll cost, u;
| ^~
coinmaster.cpp:12:12: error: expected ‘)’ before ‘_cost’
12 | node(ll _cost, ll _u) {cost = _cost, u = _u; l= r = nullptr;}
| ~ ^~~~~~
| )
coinmaster.cpp: In static member function ‘static void node::insert(node*&, node*)’:
coinmaster.cpp:19:22: error: ‘struct node’ has no member named ‘cost’
19 | if(root->cost > t->cost) {
| ^~~~
coinmaster.cpp:19:32: error: ‘struct node’ has no member named ‘cost’
19 | if(root->cost > t->cost) {
| ^~~~
coinmaster.cpp:20:28: error: ‘struct node’ has no member named ‘cost’
20 | swap(root->cost, t->cost);
| ^~~~
coinmaster.cpp:20:37: error: ‘struct node’ has no member named ‘cost’
20 |