摘要:
0 线段树 #include<bits/stdc++.h> #define ll long long using namespace std; const int N=3e5+444; struct re{ int val; int poi,deep; }q[N]; int dep[N],sz[N] 阅读全文
摘要:
cover[s]表示S这个状态下,他能包含多少台电脑。 转移f[S]=max(f[S],f[S^S0]+1)s0能包含全部元素。 #include<bits/stdc++.h> using namespace std; const int m=2e5; int cover[m],f[m],p[m], 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; const int m=5e5; int minv[m],maxv[m],v[m],n,qr,ql,z,y,az,mid,maxer,miner=10000000,k; int a1[m],a2[m]; int 阅读全文
摘要:
BZOJ1042 全集为每一种货币任意取. A c1取>=(d[1]+1)张 B c2取>=(d[2]+1)张 C... D... +0张超次数-1张超次数+2张超次数-3张超次数+4张超次数 #include<bits/stdc++.h> using namespace std; const lo 阅读全文
摘要:
正解:咕咕 #include<bits/stdc++.h> using namespace std; const int N=3e4,M=3e5; int vis[N],f[N],n,m,tot,mid,miner=1000000009,maxer=0; struct re{ int d; int 阅读全文