摘要:
// Luogu P3366 【模板】最小生成树 include <bits/stdc++.h> using namespace std; const int N=200006; int n, m; struct edge{ int u,v,w; bool operator<(const edge 阅读全文
摘要:
// Luogu P3366 【模板】最小生成树 include include include include define inf 1e9 using namespace std; int n,m,a,b,c,ans,cnt; const int N=5010; struct edge{int 阅读全文
摘要:
// O(n)#include include include using namespace std; const int N=100010; int n; char s[N]; int ch[N][26],cnt[N],idx; void insert(char *s){ int p=0; fo 阅读全文
摘要:
// Luogu P3805 【模板】manacher 算法 include include include using namespace std; const int N=3e7; char a[N],s[N]; int d[N]; //回文半径函数 void get_d(char*s,int 阅读全文
摘要:
include include include using namespace std; const int N=1000010; int m,n; char S[N],P[N]; int nxt[N]; int main(){ cin>>S+1>>P+1; m=strlen(S+1),n=strl 阅读全文
摘要:
include include include using namespace std; const int N = 10010; int n, m; char s[N]; typedef unsigned long long ULL; const int P = 131; ULL h[N], an 阅读全文
摘要:
include <bits/stdc++.h>//洛谷1368 using namespace std; const int N = 7e5; int n; int s[N]; int get_min(){ for(int i=1;i<=n;i++) s[n+i]=s[i]; int i = 1, 阅读全文