平常的快读用的都是*10,而位运算要比乘快,所以我们可以左移三位(乘2^3=8)再左移一位(乘2),然后再加上读入的字符(由大佬lcx提供思路)
inline int read() {
char ch=getchar();
int x=0,cf=1;
while(ch<'0'||ch>'9') {
if(ch=='-') cf=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9') {
x=(x<<3)+(x<<1)+(ch^48);
ch=getchar();
}
return x*cf;
}