随笔分类 - ###板子
摘要:#include<bits/stdc++.h> using namespace std; #define ll long long ll Gcd(ll x,ll y){while(y^=x^=y^=x%=y);return x;} int main() { ll a,b; cin>>a>>b; co
阅读全文
摘要:世界上最好的费用流板子! //lg p3381 #include<bits/stdc++.h> using namespace std; #define ll long long const int N= (int)5e3+3; const int M =(int)5e4+4; const ll I
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; const int N = 205; const int M = 205; const int INF = 0x3f3f3f3f; int edgeid=2; int head[N]; struct edge
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; const int N = 1e6+6; void Mergesort(int l,int r); int main() { freopen("working.in","r",stdin); freopen("
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int a[114514]; void Quicksort(int l,int r); int main() { freopen("working.in","r",stdin); freopen("workin
阅读全文
摘要:lll Read() { bool flag=0; char ch=getchar(); lll ans=0; while(!isdigit(ch) && ~ch) { flag|=(ch=='-'); ch=getchar(); } while(isdigit(ch) && ~ch) { ans=
阅读全文
摘要://lg 1226 //快速幂 #include<bits/stdc++.h> using namespace std; long long a,n,p; long long nn; long long qpow() { long long b=a; long long ans=1; while(n
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; int bkt[1005]; int n; int a[10005]; int main() { n=100; srand(time(0)); for(int i=1;i<=n;i++) a[i]=rand()
阅读全文
摘要:#include<bits/stdc++.h> using namespace std; #define N 101 int a[N]; void sort_mp() { for(int i=1;i<100;i++) { for(int j=1;j<100;j++) { if(a[j]>a[j+1]
阅读全文
摘要://lg 2455 #include<bits/stdc++.h> using namespace std; const double eps = 0.000001; const int N = 105; double a[N][N]; int n; int nowline=1;//存储当前行 vo
阅读全文
摘要://lg p3812 #include<bits/stdc++.h> using namespace std; #define ll unsigned long long ll d[100]; int n; void Insert(ll x) { for(int i=62;i>=1;i--) { i
阅读全文
摘要://lg 3804 //Copyright yeyou26 #include<bits/stdc++.h> using namespace std; //注意:这道题不是纯纯的后缀自动机,main函数有一点额外处理 #define ll long long #define N (int(2e6+6)
阅读全文
摘要://lg p3809 sa模板题 //Copyright yeyou26 //额外数据测试lcp //input:aabaaaab //output:sa:4 5 6 1 7 2 8 3 // lcp:0 3 2 3 1 2 0 1 #include<bits/stdc++.h> using nam
阅读全文
摘要://lg p3808 //Copyright yeyou26 #include<bits/stdc++.h> using namespace std; string mainstring; string ss[(int)1e6+6]; int cnt[(int)1e6+6]; int n; int
阅读全文
摘要://Copyright yeyou26 #include<bits/stdc++.h> using namespace std; const int N = 11145; int n,m,t[N][150],idx,cnt[N]; inline int trans(char c) {return c
阅读全文
摘要://Copyright yeyou26 #include<bits/stdc++.h> using namespace std; const int N = 11145; int t[N][150]; int idx; int cnt[N]; int n,m,t[N][150],idx,cnt[N]
阅读全文
摘要://lg p5410 //Copyright yeyou26 #include<bits/stdc++.h> using namespace std; const int N = (2e7)+10; char a[N],b[N]; int p[N],z[N]; int lena,lenb; long
阅读全文
摘要://lg 3805 //Copyright yeyou26 #include<bits/stdc++.h> using namespace std; int d[2*N]; char ipt[N]; char c[2*N]; int n; void init() { cin>>(ipt+1); c[
阅读全文
摘要://lg p3375 //Copyright yeyou26 #include<bits/stdc++.h> using namespace std; char p[1000005],s[1000005]; int lenp,lens; int lst[1000005]; void init();
阅读全文
摘要://lg p1368 //Copyright yeyou26 #include<bits/stdc++.h> using namespace std; const int N = 300005; int a[2*N]; int n; void init() { scanf("%d",&n); for
阅读全文