摘要:
#include "bits/stdc++.h" using namespace std; const int N=1e5+3; #define int long long int n,a[N]; int hh,stk[N],w[N]; void sov(){ hh=0; memset(a,0,si 阅读全文
posted @ 2022-11-30 23:58
towboat
阅读(29)
评论(0)
推荐(0)
摘要:
dp (n^2) #include "bits/stdc++.h" using namespace std; int n,f[35][35]; int dp(int i,int j){ if(f[i][j]!=-1) return f[i][j]; f[i][j]=0; if(i==0) retur 阅读全文
posted @ 2022-11-30 22:27
towboat
阅读(31)
评论(0)
推荐(0)
摘要:
给一些区间【l , r】 , 区间i 内间隔 d[i] 有一个点(可能会重复),保证最后只有一个位置的点数为奇数,其他位置的点数为偶数 找出这个点 二分查找 二分点的位置,注意题目中唯一的奇数点 求区间和,判断奇偶性,缩小范围 #include "bits/stdc++.h" using names 阅读全文
posted @ 2022-11-30 16:50
towboat
阅读(17)
评论(0)
推荐(0)
摘要:
#include <iostream> #include <algorithm> using namespace std; const int N=1100; struct T{ int x,y; } a[N]; int n; string c[N][2]; int cmp(T &a,T &b){ 阅读全文
posted @ 2022-11-30 14:21
towboat
阅读(125)
评论(0)
推荐(0)