friend.cpp: In function 'void solve(int, bool, int, int*)':
friend.cpp:13:21: error: return-statement with a value, in function returning 'void' [-fpermissive]
return dp[u][can].first;
^~~~~
friend.cpp:20:3: error: 'curr_ans' was not declared in this scope
curr_ans = confidence[u];
^~~~~~~~
friend.cpp:20:3: note: suggested alternative: 'wctrans'
curr_ans = confidence[u];
^~~~~~~~
wctrans
friend.cpp:30:2: error: 'curr_ans' was not declared in this scope
curr_ans = 0;
^~~~~~~~
friend.cpp:30:2: note: suggested alternative: 'wctrans'
curr_ans = 0;
^~~~~~~~
wctrans
friend.cpp:32:12: error: 'par' was not declared in this scope
if(to == par)
^~~
friend.cpp:39:9: error: return-statement with a value, in function returning 'void' [-fpermissive]
return ans;
^~~
friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:48:38: error: void value not ignored as it ought to be
return solve(0, true, -1, confidence);
^