摘要: 很明显是逆向的并查集,建立边再销毁,思路也很巧妙的逆向思考~如果正着一一销毁,相当于倒着一一建边。所以保存Q次提问,最后倒着来一一建边。在此之前先把没有销毁的边全部建好~细节power能量注意一下~View Code 1 #include <map> 2 #include <stdio.h> 3 #include <string.h> 4 #include <vector> 5 #include <iostream> 6 using namespace std; 7 8 const int N=50005; 9 int n,m,i,j 阅读全文
posted @ 2013-02-07 03:53 _sunshine 阅读(203) 评论(0) 推荐(0) 编辑