关于C++快速读入
  • 板块学术版
  • 楼主Vector_Mingfan
  • 当前回复4
  • 已保存回复4
  • 发布时间2021/2/26 00:15
  • 上次更新2023/11/5 02:41:49
查看原帖
关于C++快速读入
323989
Vector_Mingfan楼主2021/2/26 00:15

RT,C++中快速读入格式一定吗?

inline int read(){
    int x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){
        if(ch=='-')
            f=-1;
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
2021/2/26 00:15
加载中...