friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:13:37: error: 'max' was not declared in this scope
13 | dp[j][1] += max(dp[i][0], dp[i][1]); // free to do anything with invitee
| ^~~
friend.cpp:15:37: error: 'max' was not declared in this scope
15 | dp[j][0] += max(dp[i][0], dp[i][1]); // free to do anything with invitee
| ^~~
friend.cpp:19:36: error: 'max' was not declared in this scope
19 | dp[j][0] = max(dp[j][0] + dp[i][1], dp[i][0] + dp[j][1]); // taking one is fine
| ^~~
friend.cpp:22:24: error: 'max' was not declared in this scope
22 | return max(dp[0][0], dp[0][1]) //best is dependent on taking or not person 0, so just look at both.
| ^~~
friend.cpp:22:47: error: expected ';' before '}' token
22 | return max(dp[0][0], dp[0][1]) //best is dependent on taking or not person 0, so just look at both.
| ^
| ;
23 | }
| ~