当输入是一个连通图的时候,比如这样:
4 4 571233 1 2 2 3 3 4 4 1
以下题解被叉:
https://www.luogu.com.cn/blog/santishijie/solution-p2272
直接 RE。