版本比较
#21. Trygub numbers 动态维护大数
正文
增加 2 行删除 2 行
35 行未改动3637383940404142434415 行未改动6061626364646566676815 行未改动35 行未改动 for (; !isdigit(ch); ch = getchar()) if (ch == '-') sgn = -1; for (x = 0; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0'; x *= sgn;}const int B = 30; const int B = 30;const ll base = 1 << B;struct trygub_numbers{ map<int, ll> mp;15 行未改动 { auto it = mp.lower_bound(k); ll res = it == mp.end() || it -> first > k ? 0 : it -> second; if (it != mp.begin() && prev(it) -> second < 0) res--; return (res % base + base) % base; return (res % base + base) % base; }}N;int n, t1, t2, t3;int main()15 行未改动