摘要:
题解: 第一题: #include<bits/stdc++.h> using namespace std; const int M = 100005, ME = 1000005; struct edge{int u, v, w;}G[ME]; int fa[M], siz[M], tot, val[ 阅读全文
摘要:
题解: 第一题:大模拟,先把在一个循环里的连续k个相同都去掉,然后算出头和尾能消去的个数,然后就是每个循环剩余长度*(m-1)+仅去掉同一循环的剩余数的个数。 #include<bits/stdc++.h> using namespace std; #define ll long long cons 阅读全文