求助, 我读入优化过不了, cin 读入整数就过了, 不知道啥原因

P3373 【模板】线段树 2

@[whiterrr](/user/215166) 这种情况不应该把你的 read() 发出来么。。。
by WYXkk @ 2020-02-06 13:13:10


那就是快读出锅的呗
by KellyFrog @ 2020-02-06 13:14:13


@[whiterrr](/user/215166) 你快读类型是long long吗
by Dzhao @ 2020-02-06 13:22:44


洛谷有的数据没回车....
by wrpwrp @ 2020-02-06 13:32:14


@[WYXkk](/user/130151) ``` // 读入优化 inline ll read() { ll f, x; f = 1, x = 0; char ch = getchar(); while(ch < '0' && ch > '9') { if(ch == '-') f = -1; ch = getchar(); } while(ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); } return x * f; } ```
by whiterrr @ 2020-02-06 13:40:51


@[Dzhao](/user/108610) 是的
by whiterrr @ 2020-02-06 13:41:11


@[whiterrr](/user/215166) `ch < '0' && ch > '9'`改为`ch < '0' || ch > '9'`
by andyli @ 2020-02-06 13:46:52


@[whiterrr](/user/215166) 第一个 ``while`` 里应该是 ``||``不是``&&``
by 幻之陨梦 @ 2020-02-06 13:48:54


@[andyli](/user/84282) 好了, 谢谢
by whiterrr @ 2020-02-06 13:53:02


@[ZhanLang](/user/123808) ok了, 谢谢
by whiterrr @ 2020-02-06 13:53:25


|