模板
文章平均质量分 58
冷月半明
1/0.
展开
-
快速幂算法(模板代码)
#include <cstdio> #include <cmath>//#include<bits/stdc++.h>.万能头 #include <cstring>//memcpy(HH,hh,sizeof(hh));赋值函数,将hh赋值给HH #include <iostream>//str.erase(std::remove(str.begin(), str.end(), 'k'), str.end());删除指定字符 #include<.原创 2022-01-15 22:55:30 · 276 阅读 · 0 评论 -
ac自动机模板
#include<bits/stdc++.h> using namespace std; const int maxn = 1e6 + 5; const char Ch = 'a'; struct node { int next[30]; int idx, fail, cnt;//idx表示输入的第几个字符串的终止位置,fail是失配指针,cnt存该字符串出现的次数 void clear() { memset(next, 0, sizeof(next)); idx = 0, fa.原创 2021-10-03 17:14:19 · 86 阅读 · 0 评论