摘要:
#include<cstdio> #include<iostream> using namespace std; const int N=1000005; int n; long long ans; char s[N]; int nxt[N]; int main(){ scanf("%d",&n); 阅读全文
posted @ 2021-11-18 23:13
dfydn
阅读(30)
评论(0)
推荐(0)
摘要:
#include<cstdio> #include<iostream> #include<cstring> using namespace std; const int N=2000005; int head[N],sum[N],ch[N<<1][2]; int cnt; int n; int to 阅读全文
posted @ 2021-11-18 21:31
dfydn
阅读(38)
评论(0)
推荐(0)
摘要:
期望 #include<cstdio> #include<iostream> using namespace std; const int mod=1e9+7; typedef long long ll; ll w,n,k; ll ksm(ll a,ll b){ ll res=1; while(b) 阅读全文
posted @ 2021-11-18 20:47
dfydn
阅读(22)
评论(0)
推荐(0)
摘要:
比较好的差分题目 #include<cstdio> #include<iostream> using namespace std; typedef long long ll; const int N=100005; int n; ll a[N],c[N]; ll aa,bb; int main(){ 阅读全文
posted @ 2021-11-18 17:56
dfydn
阅读(23)
评论(0)
推荐(0)
摘要:
sum统计余数。如果[l,r]能被7整除,那么sum[r]和sum[l-1]的余数一定相同,然后找每个余数最前的位置和最后的位置,枚举余数统计max。 注意sum[0]=0的边界。 #include<cstdio> #include<iostream> #include<algorithm> usi 阅读全文
posted @ 2021-11-18 17:42
dfydn
阅读(78)
评论(0)
推荐(0)
摘要:
一个比较好的性质:不可能存在不刷的情况,刷上就有可能对,所以得到递推式 #include<cstdio> #include<iostream> using namespace std; int a[55][55]; int dp[55][55][2501][2],n,ans,m,t; int mai 阅读全文
posted @ 2021-11-18 15:06
dfydn
阅读(42)
评论(0)
推荐(0)

浙公网安备 33010602011771号