/in/foo.cc:24:1: error: 'vector' does not name a type
vector<int>a,f[N],g[N];//f going up. g going down.
^~~~~~
/in/foo.cc: In function 'void dg2(int, int)':
/in/foo.cc:27:15: error: 'f' was not declared in this scope
larf[x]=bigf;f[bigf].push_back(x);
^
/in/foo.cc:28:2: error: 'a' was not declared in this scope
a.push_back(x);
^
/in/foo.cc:35:69: error: 'eni' was not declared in this scope
for (int i=a.size()-1,eni=max(0,(int)(a.size()-1-f[x].size()));i>=eni;--i) g[i].push_back(a[i]);
^~~
/in/foo.cc:35:78: error: 'g' was not declared in this scope
for (int i=a.size()-1,eni=max(0,(int)(a.size()-1-f[x].size()));i>=eni;--i) g[i].push_back(a[i]);
^
/in/foo.cc: In function 'int kthanc(int, int)':
/in/foo.cc:46:33: error: 'f' was not declared in this scope
if (dep[x]-k>=dep[top]) return f[top][dep[x]-k-dep[top]];
^
/in/foo.cc:47:9: error: 'g' was not declared in this scope
return g[top][k-(dep[x]-dep[top])];
^