To do list
超级好用快读!!!
支持string和char数组
#define il inline
class IO{
static constexpr int maxn=1<<20;
char buf[maxn],*p1=buf,*p2=buf,*p3=buf;
#define gc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,maxn,stdin),p1==p2)?EOF:*p1++)
#define flush() (fwrite(buf,1,p3-buf,stdout))
#define pc(x) (p3==buf+maxn&&(flush(),p3=buf),*p3++=(x))
public:
~IO(){flush();}
template<typename T>
il IO &operator>>(T &x){
x=0;bool flag(0);char ch=gc();
while(!isdigit(ch)) flag^=ch=='-',ch=gc();
while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=gc();
flag?x=-x:0;return *this;
}
template<typename T>
il IO &operator<<(T x){
x<0?x=-x,pc('-'):0;
static short st[50],top(0);
do st[++top]=x%10,x/=10;while(x);
while(top) pc(st[top--]|48);return *this;
}
il IO &operator>>(char &x){do x=gc();while(isspace(x));return *this;}
il IO &operator<<(char x){pc(x);return *this;}
il IO &operator>>(char *x){char ch;*this>>ch;do *(x++)=ch;while(!isspace(ch=gc())&&~ch);*x='\0';return *this;}
template<typename T>il IO &operator<<(T *x){while(*x)pc(*(x++));return *this;}
il IO &operator>>(string &x){char ch;*this>>ch,x.clear();do x+=ch;while(!isspace(ch=gc())&&~ch);return *this;}
il IO &operator<<(const string &x){for(char i:x)pc(i);return *this;}
}fin,fout;点击打开
一大堆的内容
实现如下:
<details>
<summary>点击打开</summary>
一大堆的内容
</details>