摘要:
异常明显的思路,考场上却不会,连确定一条边不选都没想到 #include<bits/stdc++.h> using namespace std; #define pii pair<int,int> #define fi first #define se second #define mp make_ 阅读全文
摘要:
本来求边数又建了个图跑流,然后看题解发现直接流量置为A*w+1(A为足够大的数) 感觉很强 #include<bits/stdc++.h> using namespace std; #define ll long long const int A=1e5; const ll inf=1e18; in 阅读全文
摘要:
一眼匈牙利,没有紫啊 #include<bits/stdc++.h> using namespace std; #define pb push_back int n,m,res,a[205][205],p[40005]; int id1[205][205],fr1[40005],cnt1,id2[2 阅读全文
摘要:
其实想到方法了,但是以为复杂度炸了,好蠢 #include<bits/stdc++.h> using namespace std; #define pb push_back int n,m,rk[30005],f[30005],g[30005],dis[30005],ans; bool vis[30 阅读全文
摘要:
网络流24题~ #include<bits/stdc++.h> using namespace std; #define ll long long const int inf=1e9; const ll lnf=1e18; int N,p,m,f,n,s,r[2005],st,ed; struct 阅读全文
摘要:
挺唐的 经典一位一位来 #include<bits/stdc++.h> using namespace std; const int L=100; char _[L+5]; int k; struct node{ int a[L+5],len; node(int _k=0){ len=0;memse 阅读全文
摘要:
随便补补题 #include<bits/stdc++.h> using namespace std; int t,n,x,a[100005],res; map<int,bool> p; int main(){ scanf("%d",&t); while(t--){ res=1; scanf("%d% 阅读全文
摘要:
从未每日的每日一题 E>F 但是没时间了 #include<bits/stdc++.h> using namespace std; #define ll long long int t,n,a[100005],p[100005]; int tr[3200005][2],id[3200005],cnt 阅读全文
摘要:
校内作业多,一直忘记写blog 现在开始补上量 赛后几天秒掉了,场上真是困糊涂了,没想到分治 #include<bits/stdc++.h> using namespace std; const int mod=1e9+7; #define ll long long #define node pai 阅读全文
摘要:
看到异或直接想到线性基和trie 很明显是trie 从高到低一位位考虑,如果两个儿子都有,想使这一位为1,必须有一个变成加法 然后就便利一下trie,记录一下剩余的体力和最小的加法的数就好了 #include<bits/stdc++.h> using namespace std; #define l 阅读全文