#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tune=native")
#include "bits/stdc++.h"
#define __max(a, b) (((a) > (b)) ? (a) : (b))
#define __min(a, b) (((a) < (b)) ? (a) : (b))
#define __mem(x) memset((x), 0, sizeof((x)))
#define __il __attribute__((always_inline))
#if __cplusplus <= 201403L
#define __r register
#define ri register int
#else
#define __r
#define ri int
#endif
using namespace std;
typedef long long ll;
namespace cst
{
const double pi = acos(-1.0);
const int MIN_INT8 = -128;
const int MIN_INT16 = -32768;
const int MIN_INT = -2147483647 - 1;
const ll MIN_LL = -9223372036854775807LL - 1;
const int MAX_INT8 = 127;
const int MAX_INT16 = 32767;
const int MAX_INT = 2147483647;
const ll MAX_LL = 9223372036854775807LL;
} // namespace cst
namespace t
{
template <typename T> // return gcd
inline const T gcd(T __m, T __n)
{
while (__n != 0)
{
T __t = __m % __n;
__m = __n;
__n = __t;
}
return __m;
}
template <typename T> // return max
inline const T max(const T &a, const T &b)
{
return a > b ? a : b;
}
template <typename T> //return min
inline const T min(const T &a, const T &b)
{
return a < b ? a : b;
}
template <typename T> // return abs
inline const T abs(const T &a)
{
return a > 0 ? a : -a;
}
template <typename T> // read int
inline void in(T &x) // or long long
{
__r T res = 0;
__r int neg = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
{
if (c == '-')
{
neg = -1;
}
}
for (; isdigit(c); c = getchar())
{
res = res * 10 + c - '0';
}
x = res * neg;
}
inline int read() // read int
{
__r int res = 0, neg = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
{
if (c == '-')
{
neg = -1;
}
}
for (; isdigit(c); c = getchar())
{
res = res * 10 + c - '0';
}
return res * neg;
}
inline ll read_ll() // read long long
{
__r ll res = 0, neg = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
{
if (c == '-')
{
neg = -1;
}
}
for (; isdigit(c); c = getchar())
{
res = res * 10 + c - '0';
}
return res * neg;
}
#if __cplusplus >= 201103L
template <typename T> // read multiple int
void read_mul(T &t) // or long long
{
in(t);
}
template <typename T, typename... Args>
void read_mul(T &t, Args... args)
{
in(t);
read_mul(args...);
}
#endif
} // namespace t剪贴板
剪贴板 371tqgwe
剪贴板信息
剪贴板信息
- 收录
- 更新