题意: n(n<=200000)个点的完全图删去了m(m<=200000)条边,求剩下图的连通分量. 分析: 将未访问过的点用一个链表串起来 仍旧进行BFS,每次BFS扩展一个点u的时候,暴力去for链表,如果发现有与u相连的点则该点入队且从链表删除 直至链表为空 我们来分析一下这个的复杂度,首先明显每个点只会删除一次,O(n) 但是一个点会被for很多次,我们发现被for很多次是在原图有边的情况,所以是O(2*m) 总的复杂度O(n+m) 具体在实现过程中,要判断两点是否右边,所以要用一个s…