/in/foo.cc:26:14: error: 'M' was not declared in this scope
int hd[N],to[M],nxt[M],tot;
^
/in/foo.cc:26:21: error: 'M' was not declared in this scope
int hd[N],to[M],nxt[M],tot;
^
/in/foo.cc: In function 'void add(int, int)':
/in/foo.cc:27:31: error: 'to' was not declared in this scope
inline void add(int u,int v) {to[++tot] = v;nxt[tot] = hd[u];hd[u] = tot;}
^~
/in/foo.cc:27:45: error: 'nxt' was not declared in this scope
inline void add(int u,int v) {to[++tot] = v;nxt[tot] = hd[u];hd[u] = tot;}
^~~
/in/foo.cc: In function 'bool dfs(int)':
/in/foo.cc:31:30: error: 'nxt' was not declared in this scope
for (int i = hd[x];i;i = nxt[i]) if (dfs(to[i])) return false;
^~~
/in/foo.cc:31:46: error: 'to' was not declared in this scope
for (int i = hd[x];i;i = nxt[i]) if (dfs(to[i])) return false;
^~