prog.cpp: In function 'int solve(int, int)':
prog.cpp:2:2: error: 'vector' was not declared in this scope
vector<int> p;
^
prog.cpp:2:9: error: expected primary-expression before 'int'
vector<int> p;
^
prog.cpp:5:2: error: 'p' was not declared in this scope
p.push_back (i);
^
prog.cpp:10:2: error: 'p' was not declared in this scope
p.push_back (n);
^
prog.cpp:13:26: error: 'p' was not declared in this scope
for (int msk=1; msk<(1<<p.size()); ++msk) {
^