正文
增加 2 行删除 2 行
35 行未改动36373839404142434415 行未改动60616263646566676815 行未改动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 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;}}N;int n, t1, t2, t3;int main()15 行未改动35 行未改动36373839404142434415 行未改动60616263646566676815 行未改动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 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;}}N;int n, t1, t2, t3;int main()15 行未改动