happiness.cpp: In member function 'std::pair<long long int, long long int> Node::query(long long int)':
happiness.cpp:32:59: error: expected primary-expression before '{' token
32 | std::pair<int, int> lq = (lc ? lc->query(p) : {0, 0}), rq = (rc ? rc->query(p) : {0, 0});
| ^
happiness.cpp:32:58: error: expected ')' before '{' token
32 | std::pair<int, int> lq = (lc ? lc->query(p) : {0, 0}), rq = (rc ? rc->query(p) : {0, 0});
| ~ ^~
| )
happiness.cpp:32:100: error: expected ',' or ';' before ')' token
32 | std::pair<int, int> lq = (lc ? lc->query(p) : {0, 0}), rq = (rc ? rc->query(p) : {0, 0});
| ^
happiness.cpp:33:32: error: 'rq' was not declared in this scope; did you mean 'r'?
33 | return {lq.first + rq.first, (lq.second < lq.first + rq.second ? lq.second : lq.first + rq.second)};
| ^~
| r
happiness.cpp:33:111: error: could not convert '{<expression error>, <expression error>}' from '<brace-enclosed initializer list>' to 'std::pair<long long int, long long int>'
33 | return {lq.first + rq.first, (lq.second < lq.first + rq.second ? lq.second : lq.first + rq.second)};
| ^
| |
| <brace-enclosed initializer list>
happiness.cpp:35:37: error: expected primary-expression before '{' token
35 | return (lc ? lc->query(p) : {0, 0});
| ^
happiness.cpp:35:36: error: expected ')' before '{' token
35 | return (lc ? lc->query(p) : {0, 0});
| ~ ^~
| )
happiness.cpp:35:43: error: expected ';' before ')' token
35 | return (lc ? lc->query(p) : {0, 0});
| ^
| ;
happiness.cpp:35:43: error: expected primary-expression before ')' token
grader.cpp: In function 'int main()':
grader.cpp:16:12: warning: unused variable 'max_code' [-Wunused-variable]
16 | long long max_code;
| ^~~~~~~~