快速读入

 1 inline int read(){
 2     int x=0,f=1;
 3     char ch=getchar();
 4     while(ch<'0'||ch>'9'){
 5         if(ch=='-')
 6             f=-1;
 7         ch=getchar();
 8     }
 9     while(ch>='0'&&ch<='9'){
10         x=(x<<1)+(x<<3)+(ch^48);
11         ch=getchar();
12     }
13     return x*f;
14 }

 

posted @ 2019-09-19 20:41  Cherlie  阅读(123)  评论(0编辑  收藏  举报