friend.cpp: In function 'state f(int, state, state)':
friend.cpp:10:34: error: 'max' was not declared in this scope
10 | if(ptc == 1) return {s.p + t.q, max(s.q + t.p, s.q + t.q)};
| ^~~
friend.cpp:10:59: error: could not convert '{(s.state::p + t.state::q), <expression error>}' from '<brace-enclosed initializer list>' to 'state'
10 | if(ptc == 1) return {s.p + t.q, max(s.q + t.p, s.q + t.q)};
| ^
| |
| <brace-enclosed initializer list>
friend.cpp:11:43: error: 'max' was not declared in this scope
11 | else if(ptc == 2) return {max(s.p + t.p, max(s.p + t.q, s.q + t.p)), s.q + t.q};
| ^~~
friend.cpp:11:28: error: 'max' was not declared in this scope
11 | else if(ptc == 2) return {max(s.p + t.p, max(s.p + t.q, s.q + t.p)), s.q + t.q};
| ^~~
friend.cpp:11:80: error: could not convert '{<expression error>, (s.state::q + t.state::q)}' from '<brace-enclosed initializer list>' to 'state'
11 | else if(ptc == 2) return {max(s.p + t.p, max(s.p + t.q, s.q + t.p)), s.q + t.q};
| ^
| |
| <brace-enclosed initializer list>
friend.cpp:12:15: error: 'max' was not declared in this scope
12 | else return {max(s.p + t.q, s.q + t.p), s.q + t.q};
| ^~~
friend.cpp:12:51: error: could not convert '{<expression error>, (s.state::q + t.state::q)}' from '<brace-enclosed initializer list>' to 'state'
12 | else return {max(s.p + t.q, s.q + t.p), s.q + t.q};
| ^
| |
| <brace-enclosed initializer list>
friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:20:9: error: 'ans' was not declared in this scope
20 | return ans;
| ^~~