摘要:
K - Subarrays OR 类似DP,前缀和 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int>pii; const int N=1e5+10; int n; set 阅读全文
摘要:
CF补题:A题:忘记memset,浪费时间B题:只想到相隔偶数就算,但是没想好用什么方法计算可以和滚动优化一样,只记录上一次的位置#include <bits/stdc++.h> using namespace std; const int N=1e5+10; int a[N],pre[N],ans 阅读全文
摘要:
E - Dist Max 2 找最小值的最大值,这种题目一般都是二分 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=2e5+10,inf=0x3f3f3f3f; struct node 阅读全文
摘要:
补题 H #include <bits/stdc++.h> using namespace std; const int N=1e5+10; int a[N]; int pos[55]; int b[N]; signed main() { int n; cin>>n; for (int i=1;i< 阅读全文
摘要:
高手去散步 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=55; int g[N][N]; int dist[N]; bool st[N]; int n,m,ma; void dfs(i 阅读全文
摘要:
二分图染色(最近是被DFS折磨的一段颇有遗憾的时光) #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+10,M=2e5+10; int h[N],e[M],ne[M],idx; i 阅读全文
摘要:
CF D #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+10; int cnt[30]; signed main() { // ios::sync_with_stdio(0); 阅读全文