标签:stdin io优化 putchar names stat lower fir bool sig
//#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define X first
#define Y second
#define lb lower_bound
using namespace std;
namespace IO{
inline char gc(){
static char buf[100000],*p1=buf,*p2=buf;
return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
inline void read(int &x){
x=0;bool y=0;char c=gc();while(c<'0'||c>'9'){if(c=='-') y=1;c=gc();}
while(c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=gc();x=(y?-x:x);
}
inline void read(ll &x){
x=0;bool y=0;char c=gc();while(c<'0'||c>'9'){if(c=='-') y=1;c=gc();}
while(c>='0'&&c<='9') x=(x<<1)+(x<<3)+(c^48),c=gc();x=(y?-x:x);
}
inline void write(int x){if(!x) return;write(x/10);putchar(x%10+'0');}
inline void write(ll x){if(!x) return;write(x/10);putchar(x%10+'0');}
inline void print(int x){if(x<0) putchar('-'),write(-x);else if(x>0) write(x);else putchar('0');putchar('\n');}
inline void print(ll x){if(x<0) putchar('-'),write(-x);else if(x>0) write(x);else putchar('0');putchar('\n');}
inline void print2(int x){if(x<0) putchar('-'),write(-x);else if(x>0) write(x);else putchar('0');putchar(' ');}
inline void print2(ll x){if(x<0) putchar('-'),write(-x);else if(x>0) write(x);else putchar('0');putchar(' ');}
}
using namespace IO;
/*
inline int random(int x){return 1ll*rand()*rand()%x+1;}
inline void fc(){
for(int i=1;i<=500;i++){
print(i);
system("data.exe");
system(".exe");
system(".exe");
if(system("fc xxx.out xxx.ans")) break;
}
}
*/
///////////////////////jdkAKIOI///////////////////////////
//////////////////////////////////////////////////////////
int main(){
//srand((unsigned)time(0));
freopen("xxx.in","r",stdin);
//freopen("xxx.out","w",stdout);
return 0;
}
标签:stdin io优化 putchar names stat lower fir bool sig
原文地址:https://www.cnblogs.com/zxynothing/p/11846199.html