标签:set 0kb flag sig fine space str 占用 操作
#include<iostream> #include<iomanip> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<queue> #include<stack> #include<vector> #include<string> #include<map> #include<set> #include<ctime> #define ll long long #define ull unsigned long long using namespace std; const int N=2e5+5,MM=10007; const ull base=13331; const double Pi=acos(-1.0); const ll C=299792458; //读入挂 inline void read(int &x){char ch;bool ok; for(ok=0,ch=getchar();!isdigit(ch);ch=getchar()) if(ch==‘-‘) ok=1; for(x=0;isdigit(ch);x=x*10+ch-‘0‘,ch=getchar());if(ok) x=-x;} namespace IO { const int MX = 4e7; //1e7 占用内存 11000kb char buf[MX]; int c, sz; void Begin() { c = 0; sz = fread(buf, 1, MX, stdin);//一次性全部读入 } inline bool Read(int &t) { while (c < sz && buf[c] != ‘-‘ && (buf[c] < ‘0‘ || buf[c] > ‘9‘)) c++; if (c >= sz) return false;//若读完整个缓冲块则退出 bool flag = 0; if(buf[c] == ‘-‘) flag = 1, c++; for(t = 0; c < sz && ‘0‘ <= buf[c] && buf[c] <= ‘9‘; c++) t = t * 10 + buf[c] - ‘0‘; if(flag) t = -t; return true; } }
标签:set 0kb flag sig fine space str 占用 操作
原文地址:https://www.cnblogs.com/lightac/p/10662380.html