摘要:
基环树 基环树直径 P3248 #include<bits/stdc++.h> using namespace std; #define ll long long const int N=1e5+5; int n; int te,v[N<<1],pre[N<<1],tail[N]; ll L,len 阅读全文
摘要:
NOIP提高组 2011 铺地毯 #include<bits/stdc++.h> using namespace std; const int N=1e4+5; int n,x,y; bool bz=1; int a[N],b[N],g[N],j[N]; int main() { scanf("%d 阅读全文
摘要:
八月月赛 P6745 Number #include<bits/stdc++.h> using namespace std; #define ll long long ll k,x,a[555]; int main() { scanf("%lld %lld",&k,&x); a[k+1]+=1; w 阅读全文
摘要:
启发式合并 即:玄学合并 P3012 梦幻布丁 #include<bits/stdc++.h> using namespace std; const int N=1e5+5,M=1e6+5; int n,m,ans,a[N],st[M],f[M],pre[M],tail[M],siz[M]; voi 阅读全文