摘要:
不定期更新~ Trick 1.令 \(b_i=a_i-i\),可以将等差数列转化为相同的数 例题:ABC371F 2.对于只和数据间大小关系相关的问题,可以考虑二分答案,并转化为01序列 例题:P2824 3.在博弈题目中,考虑是不是存在一种决策完全优于另一种,可以简化问题 例题:CF2005E1 阅读全文
摘要:
花30分钟发现lg翻译出错了 又花30分钟学习欧拉回路怎么求 再花30分钟等待codeforces的queue #include<bits/stdc++.h> using namespace std; int t,n,m; vector<int> res; struct edge{ int v,w, 阅读全文
摘要:
考场真是困傻了,这都不会 横的放左边k列,竖的放上边k行,优先放能消的位置 #include<bits/stdc++.h> using namespace std; int t,n,m,k,q,a[105][105]; char s[1005]; int x[105],y[105]; int mai 阅读全文
摘要:
A. Maximize the Last Element 很明显只有奇数项可以留到最后,所以取奇数项的max即可 #include<bits/stdc++.h> using namespace std; int t,n,a[105]; int main(){ scanf("%d",&t); whil 阅读全文
摘要:
怎么是树状数组板子,这也蓝 #include<bits/stdc++.h> using namespace std; int n,m,q,a[305][305]; int c[305][305][105]; void add(int x,int y,int k,int col){ for(int i 阅读全文
摘要:
可爱的单调性啊,不会 #include<bits/stdc++.h> using namespace std; #define int long long int n,m,q,u,v,t,a[100005]; queue<int> que[3]; signed main(){ scanf("%lld 阅读全文
摘要:
唐氏小状压 #include<bits/stdc++.h> using namespace std; #define lowbit(x) (x&-(x)) int t,n,c,k,cnt[(1<<18)+5][35]; bool f[(1<<18)+5]; char s[(1<<18)+5]; in 阅读全文
摘要:
异常明显的思路,考场上却不会,连确定一条边不选都没想到 #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 阅读全文