```
int u=q.front();
q.pop();
vis[u]=1;
```
应该是
```
int u=q.front();
q.pop();
vis[u]=0;
```
吧
by hello_world2005 @ 2019-02-18 10:26:21
已AC,感谢 @[hello_world2005](/space/show?uid=106778) 大佬
by Erusel @ 2019-02-20 10:59:41
@[Robinzh](/space/show?uid=53807) 不要谢我,是你自己A的
by hello_world2005 @ 2019-02-20 11:14:12