快读快输模板(c++11)

#pragma GCC optimize(1)
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#define ri register int
#include <bits/stdc++.h>
using namespace std;
template <typename T>inline void read(T& t){
    t=0;
    register char ch=getchar();
    while(!('0'<=ch&&ch<='9')){
        if(ch=='-') t*=-1;
        ch=getchar();
    }
    while(('0'<=ch&&ch<='9')){
        t=((t<<1)+(t<<3))+ch-'0';
        ch=getchar();
    }
}
template <typename T,typename... Args> inline void read(T& t, Args&... args){
    read(t);read(args...);
}
template <typename T>inline void write(T x){
    if(x<0) putchar('-'),x=~(x-1);
    int s[40],top=0;
    while(x) s[++top]=x%10,x/=10;
    if(!top) s[++top]=0;
    while(top) putchar(s[top--]+'0');
}

int main()
{
    int a,b,c;
    read(a,b,c);
    return 0;
}
//编译选项里加上-std=s++11不然会有警告。

  

猜你喜欢

转载自www.cnblogs.com/Mercury-City/p/13173686.html