qn的快读模板

inline int read()
{
    int neg=1,x=0;
    char ch;
    while((ch=getchar())<'0'||ch>'9')
        if(ch=='-')
            neg=-1;
    x=ch-'0';
    while((ch=getchar())>='0'&&ch<='9')
        x=x*10+(ch-'0');
    return neg*x;
}