摘要:
魔板(商之和) 思路:最多2sqrt(n)种值,因此值是一段一段出现的。 可以通过出现的任意一个点x,推出该段的r(右端点) 代码:(很短) #include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { 阅读全文
摘要:
比赛组队 思路:此题讲了冰茶鸡的删点,为了不影响该集合中其它点的连接情况,我们用mom映射实际真实的父亲,然后原父亲继续保持联通(但他的魂已经转到了母亲上了)。 代码: #include<bits/stdc++.h> using namespace std; const int N=1e6+5; i 阅读全文