代码源

#include<bits/stdc++.h>

using namespace std;

#define endl '\n'
#define hh cout<<endl;
#define No cout<<"No"<<endl;
#define Yes cout<<"Yes"<<endl;
#define NO cout<<"NO"<<endl;
#define YES cout<<"YES"<<endl;
#define Time printf("%g seconds\n",1.0*clock()/CLOCKS_PER_SEC);
#define Memory printf("%g MB\n",abs(&mst - &men)/1024.0/1024);
#define log10(n) to_string(n).size()

/*
  
  # 竞赛 输出调试工具(COMPETITION_DEBUGER)
  
  将此代码贴入万能头内部最末尾
  
  然后在需要使用debug的文件前面贴入:
  auto $ = strdup("color: false, space: false, precision: 6");
  #ifndef COMPETITION_DEBUGER
  #define debug(...)
  #endif
 ** (注意,不贴这几行直接使用debug()会运行时报错) **
  
  
  然后就可以随意debug各种非自定义类型了
  比如 int, double, pair, tuple, vector, set, array等
  还支持多参数调用,比如 debug(a, b, c, d);
  
  在strdup的参数里做配置:
  设置color为true即可解锁控制台颜色输出
  - 对相同变量名采用同一颜色,不同变量名采用不同颜色
  - 在使用vscode+cph时不建议开启
  
  设置space为true即可解锁前置空格
  - 对相同变量名采用同长度前置空格,不同变量名采用不同前置空格
  
  上述二者都是为了方便查看变量
  
  设置precision的值可以调整debug浮点数的精度输出
  
 */

#ifndef COMPETITION_DEBUGER
#define COMPETITION_DEBUGER
namespace _competition_debuger { auto &Output = std::cerr; const char *Interval = ", "; int setPrecision = 9; namespace impl { template <class T> void dprint(T const& arg); void dprint(float const& arg); void dprint(double const& arg); void dprint(long double const& arg); void dprint(char const& c); void dprint(std::string const& arg); template <class T, class K> void dprint(std::pair<T, K> const& arg); template <class... Ts> void dprint(std::tuple<Ts...> const& arg); template <class T, int N> void dprint(T const (&arg)[N]); template <class T> void dprint(std::vector<T> const& arg); template <class T, std::size_t N> void dprint(std::array<T, N> const& arg); template <class T> void dprint(std::deque<T> const& arg); template <class T> void dprint(std::list<T> const &arg); template <class T> void dprint(std::forward_list<T> const &arg); template <class T> void dprint(std::multiset<T> const &arg); template <class T> void dprint(std::set<T> const& arg); template <class T> void dprint(std::unordered_set<T> const& arg); template <class K, class V> void dprint(std::map<K, V> const& arg); template <class K, class V> void dprint(std::unordered_map<K, V> const& arg); template <class T, class... Ts> void dprint(T const& first, Ts const&... args); template <class T> void dprint(T const &arg) { Output << arg; } void dprint(float const &arg) { Output << std::fixed << std::setprecision(setPrecision) << arg; } void dprint(double const &arg) { Output << std::fixed << std::setprecision(setPrecision) << arg; } void dprint(long double const &arg) { Output << std::fixed << std::setprecision(setPrecision) << arg; } template <class T, class K> void dprint(std::pair<T, K> const &arg) { Output << '('; dprint(arg.first); Output << Interval; dprint(arg.second); Output << ')'; } namespace detail_for_tuple { template <typename Tuple, std::size_t N> struct dprintUtil { static void dprint(Tuple const &t) { dprintUtil<Tuple, N-1>::dprint(t); Output << Interval; impl::dprint(std::get<N-1>(t)); } }; template <typename Tuple> struct dprintUtil<Tuple, 1> { static void dprint(Tuple const &t) { impl::dprint(std::get<0>(t)); } }; } template <class... Ts> void dprint(std::tuple<Ts...> const &arg) { Output << '('; detail_for_tuple::dprintUtil<decltype(arg), sizeof...(Ts)>::dprint(arg); Output << ')'; } template <class T> void dprint_for_cont(T first, T last) { for (T it = first; it != last; ++it) { if (it != first) { Output << Interval; } dprint(*it); } } template <class T> void dprint_for_array(T const *arg, int N) { Output << '['; dprint_for_cont(arg, arg + N); Output << ']'; } template <class T, int N> void dprint(T const (&arg)[N]) { dprint_for_array(arg, N); } template <class T> void dprint(std::vector<T> const &arg) { dprint_for_array(arg.data(), arg.size()); } void dprint(std::string const &arg) { Output << '\"'; Output << arg; Output << '\"'; } void dprint(char const &c) { Output << '\''; Output << c; Output << '\''; } template <class T, std::size_t N> void dprint(std::array<T, N> const &arg) { dprint_for_array(arg.data(), arg.size()); } template <class T> void dprint(std::deque<T> const &arg) { Output << '['; dprint_for_cont(arg.begin(), arg.end()); Output << ']'; } template <class T> void dprint(std::list<T> const &arg) { Output << '['; dprint_for_cont(arg.begin(), arg.end()); Output << ']'; } template <class T> void dprint(std::forward_list<T> const &arg) { Output << '['; dprint_for_cont(arg.begin(), arg.end()); Output << ']'; } template <class T> void dprint(std::multiset<T> const &arg) { Output << '['; dprint_for_cont(arg.begin(), arg.end()); Output << ']'; } template <class T> void dprint(std::set<T> const &arg) { Output << '{'; dprint_for_cont(arg.begin(), arg.end()); Output << '}'; } template <class K, class V> void dprint(std::map<K, V> const &arg) { Output << '{'; dprint_for_cont(arg.begin(), arg.end()); Output << '}'; } template <class T> void dprint(std::unordered_set<T> const &arg) { Output << '{'; dprint_for_cont(arg.begin(), arg.end()); Output << '}'; } template <class K, class V> void dprint(std::unordered_map<K, V> const &arg) { Output << '{'; dprint_for_cont(arg.begin(), arg.end()); Output << '}'; } template <class T, class... Ts> void dprint(T const &first, Ts const &... args) { dprint(first); Output << Interval; dprint(args...); } } const std::string colorCodes[] = { "\033[42m", "\033[43m", "\033[44m", "\033[45m", "\033[46m", "\033[92m", "\033[93m", "\033[94m", "\033[95m", "\033[96m", }; const std::string resetCode = "\033[0m"; bool setOutputColor = false; bool setOutputSpace = false; template <class T, std::size_t N> std::size_t _array_size(T (&)[N]) { return N; } inline void set_color(int c) { if (setOutputColor) { Output << colorCodes[c]; } } inline void reset_color() { if (setOutputColor) { Output << resetCode; } } std::map<std::string, int> mapNameToColor; int curIndex = 0; int you_need_open_debuger_before_use_debug = false; template <class T> void dprint(int line, const char *name, T const &arg) { assert(you_need_open_debuger_before_use_debug); std::string sName = std::string(name); if (mapNameToColor.count(sName) == 0) { mapNameToColor[sName] = curIndex; curIndex = (curIndex + 1) % _array_size(colorCodes); } int idx = mapNameToColor[sName]; if (setOutputSpace) { for (int i = 0; i < idx; i++) { Output << "  "; } } reset_color(); set_color(idx); Output << std::setw(3) << std::to_string(line); Output << ": "; Output << std::string(name) + " = "; impl::dprint(arg); Output << '\n'; reset_color(); Output << std::flush; } std::string _trim(const std::string &s) { auto start = find_if_not(s.begin(), s.end(), [](unsigned char c) { return std::isspace(c); }); auto end = find_if_not(s.rbegin(), s.rend(), [](unsigned char c) { return std::isspace(c); }).base(); return (start < end) ? std::string(start, end) : ""; } std::size_t _competition_set_debuger(const char *src) { you_need_open_debuger_before_use_debug = true; std::string setting = std::string(src); for (char &c : setting) { if ('A' <= c && c <= 'Z') { c = c - 'A' + 'a'; } } std::istringstream config_stream(setting); std::string key_value_pair; while (std::getline(config_stream, key_value_pair, ',')) { std::istringstream kv_stream(key_value_pair); std::string key, value; if (std::getline(kv_stream, key, ':') && std::getline(kv_stream, value)) { key = _trim(key); value = _trim(value); if (key == "color") { setOutputColor = (value == "true"); } else if (key == "space") { setOutputSpace = (value == "true"); } else if (key == "precision") { setPrecision = std::stoi(value); } } } return 0; } } using _competition_debuger::_competition_set_debuger;
#define _COMPT_DEBUG_COUNT_ARGS(...) _COMPT_DEBUG_COUNT_ARGS_HELPER(__VA_ARGS__, 8,7,6,5,4,3,2,1,0)
#define _COMPT_DEBUG_COUNT_ARGS_HELPER(_1,_2,_3,_4,_5,_6,_7,_8,n,...) n
#define _COMPT_DEBUG_CONCAT(a, b) _COMPT_DEBUG_CONCAT_HELPER(a, b)
#define _COMPT_DEBUG_CONCAT_HELPER(a, b) a##b
#define _COMPT_DEBUG_DISPATCH(line, ...) _COMPT_DEBUG_CONCAT(_COMPT_DEBUG_IMP, _COMPT_DEBUG_COUNT_ARGS(__VA_ARGS__))(line, __VA_ARGS__)
#define _COMPT_DEBUG_IMP1(line, arg1) do { _competition_debuger::dprint(line, #arg1, arg1); } while(false)
#define _COMPT_DEBUG_IMP2(line, arg1, arg2) do { _COMPT_DEBUG_IMP1(line, arg1); _competition_debuger::dprint(line, #arg2, arg2); } while(false)
#define _COMPT_DEBUG_IMP3(line, arg1, arg2, arg3) do { _COMPT_DEBUG_IMP2(line, arg1, arg2); _competition_debuger::dprint(line, #arg3, arg3); } while(false)
#define _COMPT_DEBUG_IMP4(line, arg1, arg2, arg3, arg4) do { _COMPT_DEBUG_IMP3(line, arg1, arg2, arg3); _competition_debuger::dprint(line, #arg4, arg4); } while(false)
#define _COMPT_DEBUG_IMP5(line, arg1, arg2, arg3, arg4, arg5) do { _COMPT_DEBUG_IMP4(line, arg1, arg2, arg3, arg4); _competition_debuger::dprint(line, #arg5, arg5); } while(false)
#define _COMPT_DEBUG_IMP6(line, arg1, arg2, arg3, arg4, arg5, arg6) do { _COMPT_DEBUG_IMP5(line, arg1, arg2, arg3, arg4, arg5); _competition_debuger::dprint(line, #arg6, arg6); } while(false)
#define _COMPT_DEBUG_IMP7(line, arg1, arg2, arg3, arg4, arg5, arg6, arg7) do { _COMPT_DEBUG_IMP6(line, arg1, arg2, arg3, arg4, arg5, arg6); _competition_debuger::dprint(line, #arg7, arg7); } while(false)
#define _COMPT_DEBUG_IMP8(line, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) do { _COMPT_DEBUG_IMP7(line, arg1, arg2, arg3, arg4, arg5, arg6, arg7); _competition_debuger::dprint(line, #arg8, arg8); } while(false)
#define debug(...) _COMPT_DEBUG_DISPATCH(__LINE__, __VA_ARGS__)
#define strdup _competition_set_debuger
#endif

mt19937 rnd(time(0));

typedef long long ll;
typedef unsigned long long ull;

#define bint BigInteger
class BigInteger{protected:using digit_t = long long;static const int WIDTH = 9;static const digit_t BASE = 1e9;static const long long FFT_LIMIT = 10000;digit_t* digits;long capacity, size;bool flag;inline void push(const digit_t&);inline void pop();inline int compare(const BigInteger&) const;static inline BigInteger fft_mul(const BigInteger&, const BigInteger&);inline BigInteger move(const long long&);static inline BigInteger inverse(const BigInteger&);public:inline void reserve(const long&);protected:inline void resize(const long&);public:BigInteger() : digits(nullptr), flag(true) {*this = 0;}BigInteger(const BigInteger& x) : digits(nullptr) {*this = x;}BigInteger(const long long& x) : digits(nullptr) {*this = x;}BigInteger(const std::string& s) : digits(nullptr) {*this = s;}BigInteger& operator= (const BigInteger&);BigInteger& operator= (const long long&);BigInteger& operator= (const std::string&);~BigInteger() {if (digits != nullptr) delete[] digits, digits = nullptr;}friend std::ostream& operator << (std::ostream& out, const BigInteger& x) {if (!x.flag) out << '-';out << (long long) x.digits[x.size];for (int i = x.size - 1; i >= 1; i--)out << std::setw(WIDTH) << std::setfill('0') << (long long) x.digits[i];return out;}friend std::istream& operator >> (std::istream& in, BigInteger& x) {std::string s; in >> s; x = s;return in;}std::string to_string() const;BigInteger operator- () const;BigInteger abs() const;bool operator< (const BigInteger&) const;bool operator> (const BigInteger&) const;bool operator== (const BigInteger&) const;bool operator!= (const BigInteger&) const;bool operator<= (const BigInteger&) const;bool operator>= (const BigInteger&) const;BigInteger operator+ (const BigInteger&) const;BigInteger operator- (const BigInteger&) const;BigInteger operator* (const BigInteger&) const;BigInteger operator/ (const long long&) const;BigInteger operator/ (const BigInteger&) const;BigInteger operator% (const long long&) const;BigInteger operator% (const BigInteger&) const;BigInteger pow(const long long&) const;BigInteger pow(const long long&, const BigInteger&) const;BigInteger sqrt(const long long& = 2) const;BigInteger& operator+= (const BigInteger&);BigInteger& operator-= (const BigInteger&);BigInteger& operator*= (const BigInteger&);BigInteger& operator/= (const long long&);BigInteger& operator/= (const BigInteger&);BigInteger& operator%= (const long long&);BigInteger& operator%= (const BigInteger&);};inline void BigInteger::push(const digit_t& val) {if (capacity == size) {long new_capacity = 0;if (capacity < 1000) new_capacity = capacity << 1;else new_capacity = (new_capacity >> 1) * 3;digit_t* new_digits = new digit_t[new_capacity + 1];std::memcpy(new_digits, digits, sizeof(long long) * (capacity + 1));delete[] digits;digits = new_digits, capacity = new_capacity, ++size;return;}digits[++size] = val;}inline void BigInteger::pop() {digits[size--] = 0;}inline int BigInteger::compare(const BigInteger& x) const {if (flag && !x.flag) return 1;if (!flag && x.flag) return -1;int sgn = (flag && x.flag ? 1 : -1);if (size > x.size) return sgn;if (size < x.size) return -sgn;for (int i = size; i >= 1; i--) {if (digits[i] > x.digits[i]) return sgn;if (digits[i] < x.digits[i]) return -sgn;}return 0;}inline void BigInteger::reserve(const long& sz) {if (digits != nullptr) delete[] digits;capacity = sz, size = 0;digits = new digit_t[sz + 1];std::memset(digits, 0, sizeof(digit_t) * (sz + 1));}inline void BigInteger::resize(const long& sz) {reserve(sz), size = sz;}BigInteger& BigInteger::operator= (const BigInteger& x) {reserve(x.size + 1);flag = x.flag, size = x.size;std::memcpy(digits, x.digits, sizeof(digit_t) * (x.size + 1));return *this;}BigInteger& BigInteger::operator= (const long long& x) {flag = x >= 0;reserve(12);if (x == 0) {digits[1] = 0;return *this;}if (x == LLONG_MIN) return *this = "-9223372036854775808";long long n = std::abs(x);do {push(n % BASE);n /= BASE;} while (n);return *this;}BigInteger& BigInteger::operator= (const std::string& s) {flag = true, reserve(s.size() / WIDTH + 1);if (s.empty() || s == "-") return *this = 0;int i = 0;if (s[0] == '-') flag = false, i++;for (int j = s.size() - 1; j >= i; j -= WIDTH) {int start = std::max(i, j - WIDTH + 1), len = j - start + 1;push(std::stoi(s.substr(start, len)));}return *this;}std::string BigInteger::to_string() const {std::stringstream ss; ss << *this;return ss.str();}BigInteger BigInteger::operator- () const {BigInteger res = *this;res.flag = !flag;return res;}BigInteger BigInteger::abs() const {BigInteger res = *this;res.flag = true;return res;}bool BigInteger::operator< (const BigInteger& x) const {return compare(x) < 0;}bool BigInteger::operator> (const BigInteger& x) const {return compare(x) > 0;}bool BigInteger::operator== (const BigInteger& x) const {return compare(x) == 0;}bool BigInteger::operator!= (const BigInteger& x) const {return compare(x) != 0;}bool BigInteger::operator<= (const BigInteger& x) const {return compare(x) <= 0;}bool BigInteger::operator>= (const BigInteger& x) const {return compare(x) >= 0;}BigInteger BigInteger::operator+ (const BigInteger& x) const {if (!x.flag) return *this - x.abs();if (!flag) return x - abs();BigInteger res;res.flag = !(flag ^ x.flag);int n = std::max(size, x.size) + 1;res.reserve(n);digit_t carry = 0;for (int i = 1; i <= n; i++) {digit_t d1 = i <= size ? digits[i] : 0, d2 = i <= x.size ? x.digits[i] : 0;res.push(d1 + d2 + carry);carry = res.digits[i] / BASE;res.digits[i] %= BASE;}while (res.size > 1 && res.digits[res.size] == 0) res.pop();return res;}BigInteger BigInteger::operator- (const BigInteger& x) const {if (!x.flag) return *this + x.abs();if (!flag) return -(abs() + x);BigInteger res;if (*this < x) res.flag = false;digit_t carry = 0;int n = std::max(size, x.size);res.reserve(n);for (int i = 1; i <= n; i++) {digit_t d1 = i <= size ? digits[i] : 0, d2 = i <= x.size ? x.digits[i] : 0;if (res.flag) res.push(d1 - d2 - carry);else res.push(d2 - d1 - carry);if (res.digits[i] < 0) res.digits[i] += BASE, carry = 1;else carry = 0;}while (res.size > 1 && res.digits[res.size] == 0) res.pop();return res;}namespace BigInteger_FFT {constexpr long double PI = std::acos(-1.0L);struct complex {long double real, imag;complex(long double x = 0.0, long double y = 0.0) : real(x), imag(y) {}complex operator + (const complex& other) const {return complex(real + other.real, imag + other.imag);}complex operator - (const complex& other) const {return complex(real - other.real, imag - other.imag);}complex operator * (const complex& other) const {return complex(real * other.real - imag * other.imag, real * other.imag + other.real * imag);}complex conj() const {return complex(real, -imag);}};complex* arr = nullptr;inline void init(int n) {if (arr != nullptr) delete[] arr, arr = nullptr;arr = new complex[n + 1];for (int i = 0; i <= n; i++) arr[i] = complex(0.0, 0.0);}inline void fft(complex* a, long len) {for (long i = len; i >= 2; i >>= 1) {complex wn(std::cos(2.0L * PI / i), std::sin(2.0L * PI / i));for (long j = 0; j < len; j += i) {complex w(1.0, 0.0);for (long k = j; k < j + (i >> 1); k++, w = w * wn) {complex u = a[k], t = a[k + (i >> 1)];a[k] = u + t, a[k + (i >> 1)] = w * (u - t);}}}}inline void idft(complex* a, long len) {for (long i = 2; i <= len; i <<= 1) {complex wn(std::cos(2.0L * PI / i), std::sin(2.0L * PI / i));for (long j = 0; j < len; j += i) {complex w(1.0, 0.0);for (long k = j; k < j + (i >> 1); k++, w = w * wn) {complex u = a[k], t = w * a[k + (i >> 1)];a[k] = u + t, a[k + (i >> 1)] = u - t;}}}}}BigInteger BigInteger::fft_mul(const BigInteger& a, const BigInteger& b) {long lim = 1;while (lim <= 3 * (a.size + b.size)) lim <<= 1;BigInteger_FFT::init(lim);using BigInteger_FFT::arr;for (int i = 0; i < a.size; i++) {arr[i * 3].real = a.digits[i + 1] % 1000;arr[i * 3 + 1].real = a.digits[i + 1] / 1000 % 1000;arr[i * 3 + 2].real = a.digits[i + 1] / (1000 * 1000);}for (int i = 0; i < b.size; i++) {arr[i * 3].imag = b.digits[i + 1] % 1000;arr[i * 3 + 1].imag = b.digits[i + 1] / 1000 % 1000;arr[i * 3 + 2].imag = b.digits[i + 1] / (1000 * 1000);}BigInteger_FFT::fft(arr, lim);for (int i = 0; i < lim; i++) arr[i] = (arr[i] * arr[i]).conj();BigInteger_FFT::idft(arr, lim);BigInteger res;res.resize(a.size + b.size + 1);digit_t carry = 0;for (int i = 0; i <= a.size + b.size; i++) {carry += (digit_t)(arr[i * 3].imag * -0.5 / lim + 0.5);carry += (digit_t)(arr[i * 3 + 1].imag * -0.5 / lim + 0.5) * 1000LL;carry += (digit_t)(arr[i * 3 + 2].imag * -0.5 / lim + 0.5) * 1000LL * 1000LL;res.digits[i + 1] += carry % BASE, carry /= BASE;}while (res.size > 1 && res.digits[res.size] == 0) res.pop();return res;}BigInteger BigInteger::operator* (const BigInteger& x) const {BigInteger zero = 0;if (*this == zero || x == zero) return zero;int n = size, m = x.size;if (1LL * n * m >= 1) {BigInteger res = fft_mul(*this, x);res.flag = !(flag ^ x.flag);return res;}BigInteger res;res.flag = !(flag ^ x.flag);res.resize(n + m + 2);for (int i = 1; i <= n; i++) {for (int j = 1; j <= m; j++) {res.digits[i + j - 1] += digits[i] * x.digits[j];res.digits[i + j] += res.digits[i + j - 1] / BASE;res.digits[i + j - 1] %= BASE;}}for (int i = 1; i <= n + m + 1; i++) {res.digits[i + 1] += res.digits[i] / BASE;res.digits[i] %= BASE;}while (res.size > 1 && res.digits[res.size] == 0) res.pop();return res;}BigInteger BigInteger::operator/ (const long long& x) const {if (x == 0) throw -1;if (*this == 0) return 0;BigInteger res;res.flag = !(flag ^ (x >= 0));digit_t cur = 0, div = std::abs(x);res.resize(size);for (int i = size; i >= 1; i--) {cur = cur * BASE + digits[i];res.digits[i] = res.flag ? (cur / div) : (-cur / -div);cur %= div;}while (res.size > 1 && res.digits[res.size] == 0) res.pop();return res;}BigInteger BigInteger::operator/ (const BigInteger& x) const {static std::vector<BigInteger> pow2 = {1};static std::vector<BigInteger> estimate;estimate.clear();if (*this < x) return 0;BigInteger cur = x;while (cur <= *this) {estimate.emplace_back(cur), cur += cur;if (estimate.size() > pow2.size()) pow2.emplace_back(pow2.back() + pow2.back());}if (cur == *this) {pow2.back().flag = !(flag ^ x.flag);return BigInteger(pow2.back());}BigInteger res = pow2[estimate.size() - 1];cur = estimate.back();for (long i = estimate.size() - 1; i >= 0; i--) {if (cur + estimate[i] <= *this) cur += estimate[i], res += pow2[i];}res.flag = !(flag ^ x.flag);return res;}BigInteger BigInteger::operator% (const long long& x) const {if (x == 2) return digits[1] & 1;return *this - (*this / x * x);}BigInteger BigInteger::operator% (const BigInteger& x) const {return *this - (*this / x * x);}BigInteger BigInteger::pow(const long long& x) const {BigInteger res = 1, a = *this;for (long long t = x; t != 0; t >>= 1) {if (t & 1) res *= a;a *= a;}return res;}BigInteger BigInteger::pow(const long long& x, const BigInteger& p) const {BigInteger res = 1, a = *this % p;for (long long t = x; t != 0; t >>= 1) {if (t & 1) res = res * a % p;a = a * a % p;}return res;}BigInteger BigInteger::sqrt(const long long& x) const {BigInteger l = 0, r = 1;while (r.pow(x) <= *this) l = r, r += r;while (l + 1 < r) {BigInteger mid = (l + r) / 2;if (mid.pow(x) <= *this) l = mid;else r = mid;}return l.pow(x) <= *this ? l : r;}BigInteger& BigInteger::operator+= (const BigInteger& x) {return *this = *this + x;}BigInteger& BigInteger::operator-= (const BigInteger& x) {return *this = *this - x;}BigInteger& BigInteger::operator*= (const BigInteger& x) {return *this = *this * x;}BigInteger& BigInteger::operator/= (const long long& x) {return *this = *this / x;}BigInteger& BigInteger::operator/= (const BigInteger& x) {return *this = *this / x;}BigInteger& BigInteger::operator%= (const long long& x) {return *this = *this / x;}BigInteger& BigInteger::operator%= (const BigInteger& x) {return *this = *this % x;}

namespace Fread{const int SIZE=1<<21;char buf[SIZE],*S,*T;inline char getchar(){if(S==T){T=(S=buf)+fread(buf,1,SIZE,stdin);if(S==T)return'\n';}return*S++;}}namespace Fwrite{const int SIZE=1<<21;char buf[SIZE],*S=buf,*T=buf+SIZE;inline void flush(){fwrite(buf,1,S-buf,stdout);S=buf;}inline void putchar(char c){*S++=c;if(S==T)flush();}struct NTR{~NTR(){flush();}}ztr;}namespace fastIO1{struct Reader{template<typename T>Reader&operator>>(T&x){char c=getchar();T f=1;while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}x=0;while(c>='0'&&c<='9'){x=x*10+(c-'0');c=getchar();}x*=f;return*this;}Reader&operator>>(char&c){c=getchar();while(c==' '||c=='\n')c=getchar();return*this;}Reader&operator>>(char*str){int len=0;char c=getchar();while(c==' '||c=='\n')c=getchar();while(c!=' '&&c!='\n'&&c!='\r'){str[len++]=c;c=getchar();}str[len]='\0';return*this;}Reader(){}}fin;struct Writer{template<typename T>Writer&operator<<(T x){if(x==0){putchar('0');return*this;}if(x<0){putchar('-');x=-x;}static int sta[45];int top=0;while(x){sta[++top]=x%10;x/=10;}while(top){putchar(sta[top]+'0');--top;}return*this;}Writer&operator<<(char c){putchar(c);return*this;}Writer&operator<<(char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}Writer&operator<<(const char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}Writer(){}}fout;}using fastIO1::Reader;using fastIO1::Writer;using fastIO1::fin;using fastIO1::fout;
#define cin fin
#define cout fout
using namespace fastIO1;

inline bool __(char ch){return ch>=48&&ch<=57;}template<class T>inline void read(T&x){x=0;bool sgn=0;static char ch=getchar();while(!__(ch)&&ch!=EOF)sgn|=(ch=='-'),ch=getchar();while(__(ch))x=(x<<1)+(x<<3)+(ch&15),ch=getchar();if(sgn)x=-x;}template<class T,class...I>inline void read(T&x,I&...x1){read(x);read(x1...);}template<class T>inline void print(T x){static char stk[70];short top=0;if(x<0)putchar('-');do{stk[++top]=x>=0?(x%10+48):(-(x%10)+48),x/=10;}while(x);while(top)putchar(stk[top--]);}template<class T>inline void printsp(T x){print(x);putchar(' ');}template<class T>inline void printen(T x){print(x);putchar('\n');}template<class T>void reada(T a[],int l,int r){int i;for(i=l;i<=r;i++)cin>>a[i];return;}template<class T>void printa(T a[],int l,int r){int i;for(i=l;i<=r;i++)cout<<a[i]<<' ';hh;return;}

//#define int long long

const int mod = 998244353;

ll ksm(ll a,ll b){if(!b)return 1;ll ans=1;while(b){if(b&1)ans*=a;a*=a;b/=2;}return ans;}ll ksm(ll a,ll b,ll mod){if(!b)return 1;ll ans=1;while(b){if(b&1)ans*=a,ans%=mod;a*=a;a%=mod;b/=2;}return ans;}

auto $ = strdup("color: true, space: true, precision: 6");
#ifndef COMPETITION_DEBUGER
#define debug(...)
#endif

bool mst;

bool men;

void solve()
{
	int a;
	cin>>a;
	debug(a);
	return;
}

signed main()
{
	int T = 1;
//	cin>>T;
	while(T--)
		solve();
	return 0;
}
posted @ 2025-08-27 11:40  OoXiao_QioO  阅读(41)  评论(0)    收藏  举报