摘要:
模板洛谷p3311 code: #include<bits/stdc++.h> using namespace std; typedef long long LL; // 常量定义:N为AC自动机状态数上限、数位DP位数上限;mod为答案取模值 const int N=2010,mod=1e9+7; 阅读全文
摘要:
模板:洛谷P5357 code: #include<bits/stdc++.h> using namespace std; const int N=2e5+10; int fail[N],tr[N][26],idx,n,times[N]; //end[i]表示第i个字符的结尾编号 int ed[N] 阅读全文
摘要:
模板题:洛谷p1939 code: #include<bits/stdc++.h> using namespace std; typedef long long LL; const int N=5,mod=1e9+7; int n,siz=3; struct matrix{ LL m[N][N]; 阅读全文
摘要:
模板题:洛谷P3375 code: 前缀函数解法 #include<bits/stdc++.h> using namespace std; const int N=2e6+10; string s,t; int n,m; int pi[N]; int main(){ cin>>s>>t; n=s.s 阅读全文
摘要:
模板题:洛谷p3805 code: #include<iostream> #include<algorithm> using namespace std; const int N=2.2e7+10; string t,s; int m,n; int d[N]; int main(){ cin>>t; 阅读全文