AT / CF 缺省源
更新了一下,现在这玩意更长了
#ifndef DEFINATION_H
#define DEFINATION_H
#include<bits/stdc++.h>
using namespace std;
namespace hdk{
class __reflection_upper_case{
private:map<char,char>mp;
public:__reflection_upper_case(){for(int i='a';i<='z';++i) mp[i]=i+'A'-'a';}
map<char,char> operator()(){return mp;}
}__uppercase;
class __reflection_lower_case{
private:map<char,char>mp;
public:__reflection_lower_case(){for(int i='A';i<='Z';++i) mp[i]=i+'a'-'A';}
map<char,char> operator()(){return mp;}
}__lowercase;
template<typename T>
class __randset{
private:vector<T>v;
public:__randset(){};
__randset(vector<T>x){v=x;};
vector<T>&operator()(){return v;};
__randset<T>operator+(__randset<T> A){
__randset<T>ans=A;
for(T i:v) ans.v.push_back(i);
return ans;
}
};
class __randset_uppercase_alpha{
private:vector<char>v;
public:__randset_uppercase_alpha(){for(int i='A';i<='Z';++i) v.push_back(i);}
__randset<char> operator()(){return __randset<char>(v);}
}randset_uppercase_alpha;
class __randset_lowercase_alpha{
private:vector<char>v;
public:__randset_lowercase_alpha(){for(int i='a';i<='z';++i) v.push_back(i);}
__randset<char> operator()(){return __randset<char>(v);}
}randset_lowercase_alpha;
class __randset_number_character{
private:vector<char>v;
public:__randset_number_character(){for(int i='0';i<='9';++i) v.push_back(i);}
__randset<char> operator()(){return __randset<char>(v);}
}randset_number_character;
class __randset_number{
private:vector<int>v;
public:__randset_number(int l,int r){for(int i=l;i<=r;++i) v.push_back(i);}
__randset<int> operator()(){return __randset<int>(v);}
};
template<typename T>
class __randset_boolen{
private:T True;T False;
public:__randset_boolen(T x,T y){True=x;False=y;}
__randset_boolen(pair<T,T>x){True=x.x;False=x.y;}
__randset_boolen<T> operator()(){return *this;}
T __Return_True()const{return True;}T __Return_False()const{return False;}
};
#define range(l,r) __randset_number(l,r)()
#define lowercase_alpha randset_lowercase_alpha()
#define uppercase_alpha randset_uppercase_alpha()
#define number_character randset_number_character()
typedef __randset<int> intof;
typedef __randset<char> charof;
typedef __randset<bool> boolof;
typedef __randset<std::string> strof;
typedef __randset<float> floatof;
typedef __randset<double> doubleof;
typedef __randset<long> longof;
typedef __randset<long long> llof;
typedef __randset<long double> ldbof;
typedef __randset<unsigned> uintof;
typedef __randset<unsigned long long> ullof;
#define setof __randset
#define randpair __randset_boolen
template<typename reflect_type,int reflect_size>
class __const_reflect_table{
private:reflect_type ref[reflect_size];
public:__const_reflect_table(const vector<reflect_type>A){
for(int i=0;i<=reflect_size-1;++i) ref[i]=A[i];
}
__const_reflect_table(const reflect_type A[]){for(int i=0;i<=reflect_size-1;++i) ref[i]=A[i];}
reflect_type operator [](int id)const{return ref[id];}
reflect_type operator ()(int id)const{return ref[id];}
__randset<reflect_type> to_randset(){
vector<reflect_type>v;for(int i=0;i<=reflect_size-1;++i) v.push_back(ref[i]);
return __randset<reflect_type>(v);
}
};
#define const_reflect_t __const_reflect_table
typedef __const_reflect_table<string,2> string_reflect_type;
#ifndef ban_yesno
string_reflect_type __const_reflect_table_yes_no({"No","Yes"});
string_reflect_type __const_reflect_table_yes_no_uppercase({"NO","YES"});
string_reflect_type __const_reflect_table_yes_no_lowercase({"no","yes"});
#define YesNo __const_reflect_table_yes_no
#define YESNO __const_reflect_table_yes_no_uppercase
#define yesno __const_reflect_table_yes_no_lowercase
#endif
template<typename reflect_type,int reflect_size>
class __reflect_table{
private:reflect_type ref[reflect_size];
public:__reflect_table(){}
__reflect_table(const vector<reflect_type>A){
for(int i=0;i<=reflect_size-1;++i) ref[i]=A[i];
}
__reflect_table(const reflect_type A[]){for(int i=0;i<=reflect_size-1;++i) ref[i]=A[i];}
reflect_type& operator [](int id){return ref[id];}
reflect_type& operator ()(int id){return ref[id];}
__randset<reflect_type> to_randset(){
vector<reflect_type>v;for(int i=0;i<=reflect_size-1;++i) v.push_back(ref[i]);
return __randset<reflect_type>(v);
}
};
#define reflect_t __reflect_table
typedef std::string __expression_t;
}
#endif
using namespace hdk;
#ifndef EXT_H
#ifndef MATH_H
#ifndef TOOL_H
#ifndef IO_H
#ifndef LIB
#define EXT_H
#include<bits/stdc++.h>
using namespace std;
template<typename T>
T floor_sqrt(T x,T l=1,T r=-1){
if(r==-1) r=x;
int ans=-1;
while(l<=r){
int mid=(l+r)/2;
if(mid*mid<=x){
l=mid+1;
ans=mid;
}
else{
r=mid-1;
}
}
return ans;
}
template<typename T>
void print(T x,bool first=true){
if(x<0){
putchar('-');
print(-x,false);
return;
}
if(x==0){
if(first) putchar('0');
return;
}
print(x/10,false);
putchar((int)(x%10)+'0');
}
template<typename T>
inline void read(T& x){
x=0;bool sym=0;char c=std::getchar();
while(!isdigit(c)){sym^=(c=='-');c=std::getchar();}
while(isdigit(c)){x=x*10+c-48;c=std::getchar();}
if(sym)x=-x;
}
istream& operator >>(istream &in,__int128 &x){
read(x);
return in;
}
ostream& operator <<(ostream &out,__int128 &x){
print(x);
return out;
}
long long power(long long a,long long n,long long mod=LLONG_MAX){
long long ans=1,base=a;
while(n){
if(mod){ if(n&1) ans=ans*base%mod;}
else{ if(n&1) ans=ans*base;}
if(mod) base=base*base%mod;
else base=base*base;
n>>=1;
}
return ans;
}
int floor_log(int base,int x){
int l=0,r=x,ans=-1;
while(l<=r){
int mid=(l+r)/2;
int res=power(base,mid);
if(res<=0 or res>x){
r=mid-1;
}
else{
l=mid+1;
ans=mid;
}
}
return ans;
}
double _log(int base,int x){
return std::log(x)/std::log(base);
}
long long __C(long long n,long long m,long long p){
if(n<m){
return 0;
}
if(m>n-m){
m=n-m;
}
long long a=1,b=1;
for(int i=0;i<m;++i){
a=(a*(n-i))%p;
b=(b*(i+1))%p;
}
return a*power(b,p-2,p)%p;
}
//Lucas
long long C(long long n,long long m,long long p){
if(!m) return 1;
return C(n/p,m/p,p)*__C(n%p,m%p,p)%p;
}
long long phi(int n){
long long ans=n;
for(int i=2;i<=sqrt(n+0.5);i++){
if(n%i==0){
ans=ans/i*(i-1);
while(n%i==0){
n/=i;
}
}
}
if(n>1){
ans=ans/n*(n-1);
}
return ans;
}
#define sqrt sqrtl
#define pow powl
#define sqrt_int floor_sqrt
#define pow_int power
#endif
#endif
#endif
#endif
#endif
#ifndef DEBUG_H
#define DEBUG_H
#ifndef ONLINE_JUDGE
#include<bits/stdc++.h>
using namespace std;
#ifdef dbg1
#define debug1_type dbg1
#endif
#ifdef dbg2
#define debug2_type dbg2
#endif
#ifdef devc
#define devide_type endc
#endif
#ifndef devide_type
#define devide_type '='
#endif
#ifndef debug1_type
#define debug1_type ' '
#endif
#ifndef debug2_type
#define debug2_type '\n'
#endif
template<typename T>
void ignored(T x){}
#define debug1(x) cout<<#x<<devide_type<<x<<debug1_type
#define debug2(x) cout<<#x<<devide_type<<x<<debug2_type
template<typename T>
void out(T x){cout<<x;}
#define div ,' ',
#define lf ,'\n',
#define eofl ,'\n'
template<typename T,typename...Args>
void out(T x,Args...y){
out(x);out(y...);
}
#else
template<typename T>
inline void ignored(T x){}
#define debug1(x)
#define debug2(x)
template<typename T>
inline void out(T x){}
#define div ,' ',
#define lf ,'\n',
#define eofl ,'\n'
template<typename T,typename...Args>
inline void out(T x,Args...y){}
#endif
#endif
int main(){
ios::sync_with_stdio(false);
}