Lang:G++
Edit12345678910111213141516171819202122232425262728293031#ifdef LOCAL//#define _GLIBCXX_DEBUG// #pragma comment(linker, "/STACK:102400000,102400000") // 在 Windows 上有效#endif//#pragma GCC optimize ("Ofast") // Ofast 等效于 -O3 -ffast-math#include <bits/stdc++.h>using namespace std;#define sq(x) (x)*(x) // square#define FAST_READ ios::sync_with_stdio(false); cin.tie(nullptr);#ifdef LOCAL#define see(x) cout <<"<DBG> " << #x << ": " << (x) << endl#endif#ifndef LOCAL#define see(x)#endif#define LSON(x) ((x) * 2)#define RSON(x) ((x) * 2 + 1)template<typename A, typename B>void Min(A &a, const B &b){if (b < a) a = b;}template<typename A, typename B>void Max(A &a, const B &b){if (b > a) a = b;}#if __cplusplus < 201402Ltemplate<class Iterator>std::reverse_iterator<Iterator> make_reverse_iterator(Iterator it){