摘要:
#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> #define N 100005 using namespace std; int num[N]; int a[N]; int pre[N]; int 阅读全文
摘要:
传送门 有 n 棵树,编号 0 到 n - 1 , 本来以为它们是 n 种不同的树,但是我们陆陆续续的得到了 m 条消息,发现之前统计错了。 消息有如下两种格式: ”M a b" ,编号 a 和 编号 b 的树划分为一种树 ; "S a", 将编号为 a 的树从它所属的种类里拿出来,成为一个新的种类 阅读全文