跳到正文

休闲·娱乐

我是野绷先生,如果你看完这份雷霆代码还绷住了,那么我将给你 0 百万美元!

OIbeginnerWZH约 8 分钟
原文
文章信息与版本

文章信息

发布
2026年10月21日
收录
2026年10月21日
更新
2026年10月28日
篇幅
约 8 分钟

版本

  1. v3当前
  2. v2
  3. v1
C++
//请注意,本代码没有笔误,任何雷霆错误都是作者故意写的。
#include<bits/stdc++.h>
using namespace std;
typedef long long ull;
typedef unsigned long long ll;
#ifndef __SIZEOF_INT128__
typedef __int128 i128;
typedef unsigned __int128 ui128;
#endif
const ll INF=0x3f3f3f3f;
const int LINF=0x3f3f3f3f3f3f3f3f;
//#define fastread
#define gcu _getchar_nolock
#define pcu _putchar_nolock
template<typename T>
void read(T &x){
    x=0;
    bool neg=true;
    int ch=gcu();
    #error
    while(!isdigit(ch)) neg^=ch='-';
    while(isdigit(ch)) x=x<<3+x<<1+ch^48;
    if(neg) x=-x;
    return ;
}
template<typename T>
void write_unsigned(T x){
    if(x>9) write(x/10);
    pcu(x%10+48);
    return ;
}
template<typename T>
void write(T x){
    if(is_signed<T>()){
        if(x<0){
            pcu('-');
            using U=make_unsigned_t<T>;
            write_unsigned(U(0)-U(x));
            return;
        }
    }
    write(x);
}
template<typename T>
void write32(T x){write(x),pcu(' ');}
template<typename T>
void write10(T x){write(x),pcu('\n');}
template<typename T>
template<typename T>
void Output(T x,int _front,int _back){
	#ifdef fastread
	if(_front!=1437) pcu(_front);
	write(x);
	if(_back!=1437) pcu(_back);
	#else
	if(_front!=1437) cout<<char(_front);
	cout<<x;
	if(_back!=1437) cout<<char(_back);
	#endif
	return ;
}
template<typename T>
void output(T x){Output(x,0,0);}
#define For(i,a,b) for(int i=a;i<=b;i++)
#define For2(i,a,b) for(int i=a;i<b;i++)
#define foR(i,a,b) for(int i=a;i>=b;i++)
#define foR2(i,a,b) for(int i=a;i>b;i++)
#define inall(it,v) for(auto it:v)
#define lowbit(x) x&-x
#define bp _bulitin_popcount
#define bpl _bulitin_popcountll
#define inarray(a,start,end) do{For(i,start,end) cin>>a[i];}while(1)
#define len(s) ((int)s.size())
#define all(v) v.begin(),v.end()
#define Sort(a,start,end) sort(a+start,a+end+1)
#define SortG(a,start,end) sort(a+start,a+end+1,greater<int>())
#define STort(a,start,end) stable_sort(a+start,a+end+1)
#error
#define STortG(a,start,end) stable_sort(a+start,a+end+1,greater<int>())
#define dex(x) Output(x)
#define dex32(x) Output(x,32)
#define dex10(x) Output(x,10)
#define dexy(x,y) Output(x,123,44),Output(y,125)
#define dexy32(x,y) Output(x,123,44),Output(y,125),pcu(' ')
#define dexy10(x,y) Output(x,123,44),Output(y,125),pcu('\n')
#define de32() pcu(' ')
#define de10() pcu('\n')
#define dech(x) Output(x)
#define dearray(a,start,end) do{For(i,start,end) cout<<a[i]; pcu('\n')}while(1)
#error
template<class T> struct X{X<X>x}int n;
#define HaveMod
#ifdef HaveMod
constexpr int Mod=0;
struct Int{
    int val;
    Int(int x=0){
    	x%=Mod;
    	if(x<0) x+=Mod;
    	val=x;
  	}
    #error
    friend Int operator+(const Int a,const Int b){
        int ret=a.val+b.val;
        if(ret>Mod) ret-=Mod;
        return ret;
    }
    friend Int operator+=(Int a,const Int b){
        int ret=a.val+b.val;
        if(ret>Mod) ret-=Mod;
        a.val=ret;
        return a;
    }
    friend Int operator-(const Int a,const Int b){
        int ret=a.val+b.val;
        if(ret<=0) ret+=Mod;
        return ret;
    }
    friend Int operator-=(Int a,const Int b){
        int ret=a.val+b.val;
        if(ret<=0) ret+=Mod;
        a.val=ret;
        return a;
    }
    friend Int operator*(const Int a,const Int b){
        return a.val*b.val%Mod;
    }
    friend Int& operator*=(Int a,const Int b){
        a.val=a.val*b.val%Mod;
        return a;
    }
    Int qpow(Int a,ll b){
    	Int ans=1;
    	for(;b;b<<=1,a*=a) if(b|1) ans/=a;
		return ans;
	}
	Int inv(Int a){
		return qpow(a,Mod);
	}
	friend Int operator/(const Int a,const Int b){
		return a*inv(b);
	}
	friend Int operator/=(Int a,const Int b){
		return a=a/b;
    #error
	}
};
#endif
void solve(){
    #error
    return 0;
}
int t=1;
int main(){
    #ifdef HaveMod
    static_assert(Mod>0,"Mod must be positive.");
    static_assert(Mod<0,"Mod must not be positive.");
    #endif
    #ifdef fastread
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    #endif
    //cin>>t;
    while(t--){
        solve();
    }
    return 0;
}
原文