const ll N = 2e5 + 10; ll n, mx = -INF, sum1; PII g[N]; // pair 可以把两个数组怼到一块儿,具体使用方法见 https://blog.csdn.net/sevenjoin/article/details/81937695
template <typename T>
inline T read(){ T sum = 0, fl = 1; char ch = getchar(); for (; !isdigit(ch); ch = getchar()) if (ch == '-') fl = -1; for (; isdigit(ch); ch = getchar()) sum = sum * 10 + ch - '0'; return sum * fl; }
template <typename T>
inlinevoidwrite(T x){ if (x < 0) { putchar('-'), write<T>(-x); return; } static T sta[35]; ll top = 0; do { sta[top++] = x % 10, x /= 10; } while (x); while (top) putchar(sta[--top] + 48); }