c++标准格式

· · 个人记录

#include<bits/stdc++.h>
#define endl "\n"
#define f(a,b,k,i) for(int i=a;i<=b;i+=k)
#define fb(a,b,k,i) for(int i=a;i>=b;i-=k)
typedef long long ll;
typedef double db;
using namespace std;
const int N=2e5+5;
const int int_inf=INT_MAX;
const ll ll_inf=LLONG_MAX;
void open(string s){
    if(!s.size())return;
    freopen((s+".in").c_str(),"r",stdin);
    freopen((s+".out").c_str(),"w",stdout);
}
void IOS(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
}
inline ll read(ll &n0){
    n0=0;
    ll x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){
        if(ch=='-')f=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        x=(x*10+ch-'0');
        ch=getchar();
    }
    return n0=x*f;
}
ll nx,n;
signed main(){
    //open("");
    read(nx);
    printf("%lld",nx);
    return 0;
}