zoj4100 Vertices in the Pocket(权值线段树+二分)
题目链接: Vertices in the Pocket
题意:
T组样例,给出n个初始孤立点,给出q个下列操作之一:(n,q<=1e6)
1 a b:增加边 (a, b)
2 k:询问:如果加入k条边,能得到的连通分量个数的最小值和最大值。
Sample Input
1
5 5
1 1 2
2 1
1 1 3
2 1
2 3
Sample Output
3 3
2 3...
原创
2019-04-29 20:38:23 ·
344 阅读 ·
0 评论