#include<bits/stdc++.h>
using namespace std;
#define swap(x,y) (x^=y^=x^=y)
#define pt puts("")
using ll=long long;using ull=unsigned long long;
#ifdef linux
#define gc getchar_unlocked
#define pc putchar_unlocked
#else
#define gc getchar
#define pc putchar
#endif
namespace IO{
template<typename T>inline bool read(T &x){x=0;char s=gc();bool f=true;for(;(s<'0'||'9'<s)&&(s!=EOF);s=gc()) if(s=='-') f=false;for(;'0'<=s&&s<='9';s=gc()) x=(x<<1)+(x<<3)+(s^48); if(!f) x=~x+1;return s!=EOF;}
inline bool read(string &str){char s=gc();for(;s!=' '&&s!='\n'&&s!=EOF;s=gc())str.push_back(s);return s!=EOF;}
inline bool read_line(string &str){char s=gc();for(;s!='\n'&&s!=EOF;s=gc()){str.push_back(s);}return s!=EOF;}
inline bool read(char &s){bool flag=(scanf(" ")!=EOF);s=gc();return flag&&(s!=EOF);}
inline bool read(char *s){return (scanf("%s",s)!=EOF);}
template<class T,class... Args> inline bool read(T &x,Args&... args){return (read(x)&&read(args...));}
template<class T>inline void write(T x){static T st[45];T top=0;if(x<0)x=~x+1,pc('-');do{st[top++]=x%10;}while(x/=10);while(top)pc(st[--top]^48);}
inline void write(char x){pc(x);}
inline void write(string s){for(register int i=0;s[i];++i) pc(s[i]);}
inline void write(char *s){printf("%s",s);}
template<class T,class... Args> inline void write(T x,Args... args){write(x);write(args...);}
}using namespace IO;
signed main(){
#ifndef ONLINE_JUDGE
freopen("in.in","r",stdin);
freopen("out.out","w",stdout);
#endif
}
标签:read,args,缺省,long,write,using,define
From: https://www.cnblogs.com/hzoi-Cu/p/18141322