Hello,World!
大家好!我是 lhc0707,来自 SDJN,一名很弱的 OIer。
搞了这个博客主要是因为谷博客据说要没已经没了,而 Hexo 博客太难维护了。
欢迎各位巨佬来踩爆这个蒟蒻。
常用的 id 有:
-
lhc0707。Luogu, CF, atc, uoj, loj, qoj 等一车 oj 的号都是这个,qq 小号(常用号)是这个,看见这个就是我没错了。
-
lotus_grass。2024/12 想的,Luogu, CF 的小号是这个,outlook 是这个(怎么 twitter 上这个号是日本人啊/fn)。
- lotus-grass。Github 是这个,因为不允许有下划线,严肃推销所有公开仓库。
-
lt_g7777。小号的小号,7777 是幸运数字也是致敬 nzhtl1477,重率较低应该。叫这个的号一般不看。
-
rosyshell。我妈给我的号,一些她之前注册过现在用不着的就直接给我了,例如网易云音乐。
-
涤生。小学的时候崇拜曾剃头给自己起的名,QQ 大号是这个,导致现在仍然很笨。
放一些有用的东西。
缺省源
#include <bits/stdc++.h>
#define INF 0x3f3f3f3f3f3f3f3f
#define inf 0x3f3f3f3f
#define pn putchar(10)
#define fi first
#define se second
#define pp putchar(' ')
#define pii pair<int,int>
#define pdi pair<ll,ll>
#define mem(aa,bb) memset(aa,bb,sizeof(aa))
#define fo(i,a,b) for(int i=(a);i<=(b);++i)
#define Fo(i,a,b) for(int i=(a);i>=(b);--i)
#define pb push_back
#define reg register
#define eb emplace_back
#define bct __builtin_popcount
#define mk make_pair
#define IT iterator
#define all(x) x.begin(),x.end()
#define lbd lower_bound
#define ubd upper_bound
#define lowbit(x) (x&(-x))
#define gb(x,i) ((x>>i)&1)
#define IOS ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
// #pragma GCC optimize(2)
using namespace std;
typedef int32_t i32;
typedef int64_t i64;
typedef uint32_t u32;
typedef uint64_t u64;
typedef __int128_t i128;
typedef __uint128_t u128;
typedef double db;
// typedef int ll;
typedef long long ll;
// typedef __int128 ll;
const ll mod=1e9+7;
// #define getchar getchar_unlocked
// #define putchar putchar_unlocked
struct FastMod
{
using ull=unsigned long long;
using L=__int128; ull b,m;
FastMod(ull b):b(b),m(ull((L(1)<<64)/b)){}
ull reduce(ull a) const{ull q=(ull)((L(m)*a)>>64),r=a-q*b;return r>=b?r-b:r;}
} Mod(2);
template<typename T>using _is_integral=typename enable_if<is_integral<T>::value>::type;
template<typename T,typename=_is_integral<T>>T operator%(T x,const FastMod &Mod){return Mod.reduce(x);}
template<typename T,typename=_is_integral<T>>T &operator%=(T &x,const FastMod &Mod){return x=Mod.reduce(x);}
template<class T>inline bool ckmn(T &a,T b){return a>b?a=b,1:0;}
template<class T>inline bool ckmx(T &a,T b){return a<b?a=b,1:0;}
template<class T>inline void _A(T &x,T y){x=(x+y+mod)%Mod;}
template<class T>inline void _M(T &x,T y){x=1ll*x*y%Mod;}
template<class T>inline ll A_(T x,T y){return (x+y+mod)%Mod;}
template<class T>inline ll M_(T x,T y){return 1ll*x*y%Mod;}
template<class T>inline void read(T &s)
{
s=0;int f=1;char c=getchar();while(!isdigit(c)){if(c=='-'){f=-1;}c=getchar();}
while(isdigit(c)){s=(s<<3)+(s<<1)+(c^48),c=getchar();}s*=f;return;
}
template<class T>inline void wr(T x)
{
if(x<0){putchar('-'),x=-x;}int buf[21],top=0;while(x){buf[++top]=x%10,x/=10;}
if(!top){buf[++top]=0;}while(top){putchar(buf[top--]^'0');}return;
}
template<class T,class ...A>inline void read(T &x,A &...a){read(x);read(a...);}
template<class T,class ...A>inline bool ckmn(T &x,T y,A ...a){return ckmn(x,y)|ckmn(x,a...);}
template<class T,class ...A>inline bool ckmx(T &x,T y,A ...a){return ckmx(x,y)|ckmx(x,a...);}
template<class T,class ...A>inline void _A(T &x,T y,A ...a){_A(x,y),_A(x,a...);}
template<class T,class ...A>inline void _M(T &x,T y,A ...a){_M(x,y),_M(x,a...);}
template<class T,class ...A>inline ll A_(T x,T y,A ...a){return A_(A_(x,y),a...);}
template<class T,class ...A>inline ll M_(T x,T y,A ...a){return M_(M_(x,y),a...);}
const ll NN=1e6+5;
ll Pre[NN],Inv[NN];
inline ll qpow(ll a,ll b){return !b?1ll:qpow(1ll*a*a%Mod,b>>1ll)*((b&1ll)?a:1ll)%Mod;}
inline ll C(ll n,ll m){return (n<m||n<0||m<0)?0ll:Pre[n]*Inv[m]%Mod*Inv[n-m]%Mod;}
inline void InitC(ll n){Pre[0]=1;fo(i,1,n){Pre[i]=M_(Pre[i-1],ll(i));}Inv[n]=qpow(Pre[n],mod-2);Fo(i,n-1,1){Inv[i]=M_(Inv[i+1],(ll)i+1);}Inv[0]=1;}
inline void solve()
{
}
i32 main()
{
auto begin=chrono::high_resolution_clock::now();
Mod=FastMod(mod);
int T=1;//read(T);
while(T--)solve();
auto end=chrono::high_resolution_clock::now();
auto elapsed=chrono::duration_cast<chrono::nanoseconds>(end-begin);
cerr<<"Time measured: "<<elapsed.count()*1e-9<<" seconds.\n";
return 0;
}
一般不格式化,写板子的时候会格式化。格式化配置:
BasedOnStyle: LLVM
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
BreakBeforeBraces: "Allman"
BreakBeforeConceptDeclarations: Allowed
ColumnLimit: 120
IndentWidth: 1
RequiresClausePosition: SingleLine

浙公网安备 33010602011771号