#include #include using namespace std; using ll=long long; using vi=vector; using vll=vector; using P=pair; #define OVERLOAD_REP(_1, _2, _3, name, ...) name # define rep1(i, n) for (auto i = 0; i < (n); i++) # define rep2(i,start,end) for (auto i=(start);i<(end);i++) #define rep(...) OVERLOAD_REP(__VA_ARGS__, rep2, rep1)(__VA_ARGS__) #define PRINTEXIT(value) { cout << value << endl; return 0; } #define all(a) (a).begin(), (a).end() // sort(all(a)) #define bit(x,i)(((x)>>(i))&1) // i(0~)番目のビット #ifdef LOCAL # include # define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else # define debug(...) (static_cast(0)) #endif templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b