#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 __mem(x) memset((x), 0, sizeof((x)))
#define __il __attribute__((always_inline))
#if __cplusplus <= 201403L
#define __r register
#define ri register int
#define rl register long long
#else
#define __r
#define ri int
#define rl long long
#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 read(T &t) // or long long
{
__r T 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';
}
t = res * neg;
}
inline int in() // read int
{
ri T;
read(T);
return T;
}
inline ll in_ll() // read long long
{
rl T;
read(T);
return T;
}
#if __cplusplus >= 201103L
template <typename T, typename... Args> //read multiple int
inline void read(T &t, Args... args) //or multiple long long
{
read(t);
read(args...);
}
#endif
} // namespace t剪贴板
剪贴板 6ooasar4
剪贴板信息
剪贴板信息
- 收录
- 更新