mushrooms.cpp:3:9: error: expected unqualified-id before 'if'
3 | if (byType[t].size() < 2){
| ^~
mushrooms.cpp:6:9: error: 'll' does not name a type
6 | ll res = use_machine(vi{x,byType[t][0],y,byType[t][1]});
| ^~
mushrooms.cpp:6:63: error: expected unqualified-id before ')' token
6 | ll res = use_machine(vi{x,byType[t][0],y,byType[t][1]});
| ^
mushrooms.cpp:7:17: error: expected constructor, destructor, or type conversion before '(' token
7 | add_type(x,(res&1) ? !t : t);
| ^
mushrooms.cpp:8:17: error: expected constructor, destructor, or type conversion before '(' token
8 | add_type(y,(res&2) ? !t : t);
| ^
mushrooms.cpp:9:5: error: expected declaration before '}' token
9 | }
| ^
mushrooms.cpp:10:1: error: expected unqualified-id before 'public'
10 | public:
| ^~~~~~
mushrooms.cpp: In function 'int solve()':
mushrooms.cpp:18:9: error: 'addOne' was not declared in this scope
18 | addOne(1);
| ^~~~~~
mushrooms.cpp:19:13: error: 'n' was not declared in this scope
19 | if (n > 2) addOne(2);
| ^
mushrooms.cpp:20:14: error: 'll' was not declared in this scope
20 | for (ll i = 2; n > 2*i; i++){
| ^~
mushrooms.cpp:20:24: error: 'n' was not declared in this scope
20 | for (ll i = 2; n > 2*i; i++){
| ^
mushrooms.cpp:20:30: error: 'i' was not declared in this scope
20 | for (ll i = 2; n > 2*i; i++){
| ^
mushrooms.cpp:21:13: error: 'addTwo' was not declared in this scope
21 | addTwo(2*i-1,2*i);
| ^~~~~~
mushrooms.cpp:23:13: error: 'n' was not declared in this scope
23 | if (n%2 == 1){
| ^
mushrooms.cpp:26:16: error: 'ctr' was not declared in this scope
26 | return ctr[0];
| ^~~
mushrooms.cpp: At global scope:
mushrooms.cpp:28:1: error: expected declaration before '}' token
28 | };
| ^
mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:31:5: error: 'Solver' was not declared in this scope; did you mean 'solve'?
31 | Solver mySolver(n);
| ^~~~~~
| solve
mushrooms.cpp:32:12: error: 'mySolver' was not declared in this scope
32 | return mySolver.solve();
| ^~~~~~~~