/in/foo.cc: In function 'void dfs_up(int, int, int)':
/in/foo.cc:55:7: error: 'v' was not declared in this scope
if (v == fa)
^
/in/foo.cc:57:10: error: 'v' was not declared in this scope
dfs_up(v, u, val - val_down[v] - (idx[i] < 0) + (idx[i] > 0));
^
/in/foo.cc: In function 'int getfa(int)':
/in/foo.cc:80:11: error: 'dsu' was not declared in this scope
if (u == dsu[u])
^~~
/in/foo.cc:82:9: error: 'dsu' was not declared in this scope
return dsu[u] = getfa(dsu[u]);
^~~
/in/foo.cc: In function 'bool unite(int, int)':
/in/foo.cc:88:2: error: 'dsu' was not declared in this scope
dsu[u] = v;
^~~
/in/foo.cc: In function 'void work_cyc(int)':
/in/foo.cc:112:4: error: 'dsu' was not declared in this scope
dsu[u] = u;
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:153:25: error: 'memset' was not declared in this scope
memset(lst, -1, n << 3);
^