rt,这两段代码意义有什么不同吗?
Code 1:
for (int i = head[u]; ~i; i = edge[i].nxt) { vis[edge[i].to] = 1; }
Code 2:
for (int to : g[u]) { vis[to] = 1; }