/in/foo.cc: In function 'int main()':
/in/foo.cc:14:2: error: 'vector' was not declared in this scope
vector<vector<int>> dp(n, vector<int>(2, 1));
^~~~~~
/in/foo.cc:14:2: note: suggested alternative:
In file included from /usr/include/c++/6/vector:64:0,
from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_vector.h:214:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^~~~~~
/in/foo.cc:14:16: error: expected primary-expression before 'int'
vector<vector<int>> dp(n, vector<int>(2, 1));
^~~
/in/foo.cc:18:5: error: 'dp' was not declared in this scope
dp[i][0] = max(dp[i][0], dp[j][1] + 1);
^~
/in/foo.cc:21:5: error: 'dp' was not declared in this scope
dp[i][1] = max(dp[i][1], dp[j][0] + 1);
^~
/in/foo.cc:25:22: error: 'dp' was not declared in this scope
printf("%d\n", max(dp[n - 1][0], dp[n - 1][1]));
^~