
模板
Forever_Young_L
这个作者很懒,什么都没留下…
展开
-
KMP模板
字符串匹配算法,时间复杂度为O(n+m) #include<bits/stdc++.h> using namespace std; typedef long long ll; const int INF=0x3f3f3f3f; const int MAX_N=100; const int M=1e9+7; char s[100005],p[100005]; int net[100...原创 2020-03-20 22:45:09 · 143 阅读 · 0 评论 -
C++生成正态分布样本、M-H采样
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<double> vec; typedef vector<vec> mat; const int INF=0x3f3f3f3f; const int MAX_N=100; const double ...原创 2020-02-09 14:28:54 · 721 阅读 · 0 评论 -
C++矩阵相乘、矩阵快速幂
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<double> vec; typedef vector<vec> mat; const int INF=0x3f3f3f3f; const int MAX_N=100; mat mul(mat...原创 2020-02-09 13:43:49 · 353 阅读 · 1 评论