快读模板
作者:互联网
#include <bits/stdc++.h> using namespace std; const int MX = 1e5; const long long inf = 0x3f3f3f3f; inline int read() { int res = 0; bool sign = false; char c = getchar(); while(c < '0' || c > '9'){ if(c == '-') sign = true; c = getchar(); } while(c >= '0' && c <= '9') { res = (res << 3) + (res << 1) + (c ^ 48); c = getchar(); } return sign ? -res : res; } inline void write(int x) { if (x < 0) { putchar('-'); x = -x; } if (x > 9) write(x / 10); putchar(x % 10 + '0'); } signed main() { return 0; }
解除绑定的cin,cout和scanf,prinf速度差不多,快读比他们都稍快一些。还是有必要留个板子的。
标签:10,const,int,long,sign,快读,模板,getchar 来源: https://www.cnblogs.com/dolphinchan/p/16293386.html