摘要:
###1001.Anti-AK Problem ###1002.Blow up the Enemy int main(){ int T,x,y; scanf("%d",&T); while (T--){ int n; scanf("%d",&n); int mi=1e9,cnt=0,t; for ( 阅读全文
摘要:
###1001.Tokitsukaze, CSL and Palindrome Game ###1002.Lady Layton and Stone Game ###1003.Tokitsukaze and Colorful Tree ###1004.Tokitsukaze and Multiple 阅读全文
摘要:
###A.African Sort ###B.Binary Vector const int mod=1e9+7; const int N=2e7+10; typedef long long ll; int a[N],b[N]; int qpow(ll x,int y){ ll ans=1; whi 阅读全文
摘要:
###A.Portal ###B.Graph 思路:观察分析得,所求值为异或最小生成树的边权和,利用字典树,把每个数按其bit插入深度为30的字典树中,O(nlogn) const int N=2e5+10; const int inf=0x3f3f3f3f; int n; vector<pair< 阅读全文
摘要:
###1001.Total Eclipse 思路:从大到小建树,利用并查集路径压缩 int n,m,k; int a[N],rk[N],f[N],vis[N],fa[N]; vector<int>v[N]; int ff(int x){ if (f[x]==x)return x; return f[ 阅读全文