friend.cpp: In function 'void go(int)':
friend.cpp:10:7: error: cannot convert 'std::vector<int>' to 'int' for argument '1' to 'void go(int)'
go(x);
^
friend.cpp:11:23: error: no match for 'operator[]' (operand types are 'int [1001][2]' and 'std::vector<int>')
ans[v][0] += max(ans[x][1], ans[x][0]);
^
friend.cpp:11:34: error: no match for 'operator[]' (operand types are 'int [1001][2]' and 'std::vector<int>')
ans[v][0] += max(ans[x][1], ans[x][0]);
^
friend.cpp:12:19: error: no match for 'operator[]' (operand types are 'int [1001][2]' and 'std::vector<int>')
ans[v][1] += ans[x][0];
^
friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:23:5: error: 'i' was not declared in this scope
go(i);
^