CodeStorm!
Superiority · · 算法·理论
模板
#include<bits/stdc++.h>
using namespace std;
#define zjj long long
// #define int long long
const int MAXN=1e6+5;
const int mod=1e9+7;
int T=1;
struct custom_hash {
static uint64_t splitmix64(uint64_t x) {
x+= 0x9e3779b97f4a7c15;
x=(x^(x>>30))*0xbf58476d1ce4e5b9;
x=(x^(x>>27))*0x94d049bb133111eb;
return x^(x>>31);
}
size_t operator()(uint64_t x) const{
static const uint64_t FIXED_RANDOM=chrono::steady_clock::now().time_since_epoch().count();
return splitmix64(x+FIXED_RANDOM);
}
};
namespace Colin{
void init(){
}
}
namespace M{//数论
double distance(const int x,const int y,const int a,const int b){
return sqrt((x-a)*(x-a)+(y-b)*(y-b));
}
zjj qpow(zjj x,zjj a){
zjj res=1;
while(a){
if(a%2==1){
res*=x;
res%=mod;
// cout<<res<<endl;
}
x*=x;
x%=mod;
a>>=1;
}
return res;
}
}
namespace S{//字符串
}
namespace Tree{//树
}
namespace G{//图论
}
namespace Struct{//数据结构
}
namespace Search{//搜索 or 查找
}
void solve(){
Colin::init();
}
int main(){
// signed main(){
// srand(time(0));
// clock_t st=clock(),ed;
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
// freopen("data.in", "r", stdin);
// freopen("data.out", "w", stdout);
#endif
// cin>>T;
while(T--){
solve();
}
// ed=clock();
// double endtime=(double)(ed-st)/CLOCKS_PER_SEC;
// cout<<"Total time:"<<endtime<<endl;
// system("pause");
return 0;//exit(0);
}
算法大全
字符串:
- KMP(X):link
tree
- Segment Tree(Magic) link
数论
暴力/基础
倍增/二分
- LCA(X):link
DP
其它
- 随机种子 srand((unsigned)time(NULL));