inline void read(int &x){
int s=0; x=1;
char ch=getchar();
while(ch<'0' || ch>'9') {if(ch=='-')x=-1;ch=getchar();}
while(ch>='0' && ch<='9') s=(s<<3)+(s<<1)+ch-'0',ch=getchar();
x*=s;
}
template <class T> inline void read (T &x)
{
x = 0;
bool f = 0;
char ch = getchar ();
while (ch < '0' || ch > '9') f |= ch == '-', ch = getchar ();
while (ch >= '0' && ch <= '9') x = (x << 3) + (x << 1) + (ch ^ 48), ch = getchar ();
x = f ? ~x + 1 : x;
}
template <class T> inline void write (T x)
{
static char c[21];
unsigned p = 0;
if (x < 0) putchar ('-'), x = ~x + 1;
if (!x)
{
putchar ('0');
return ;
}
while (x) c[++p] = x % 10 ^ 48, x /= 10;
while (p) putchar (c[p]), --p;
}
namespace IO_Plus
{
#define chargs 100000
char obuf[1 << 21], *p3 = obuf;
inline char gc ()
{
static char buf[chargs], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread (buf, 1, chargs, stdin), p1 == p2) ? EOF : *p1++;
}
inline void pc (char x)
{
(p3 - obuf < (1 << 21)) ? (*p3++ = x) : (fwrite (obuf, p3 - obuf, 1, stdout), p3 = obuf, *p3++ = x);
}
inline void read (char ch)
{
ch = gc ();
}
inline void read (char *s)
{
char ch = gc();
while (ch != ' ' && ch != '\n') *s++ = ch, ch = gc ();
}
inline void read (int &x)
{
x = 0;
bool f = 0;
char ch = gc ();
while (ch < '0' || ch > '9') f |= ch == '-', ch = gc ();
while (ch >= '0' && ch <= '9') x = (x << 3) + (x << 1) + (ch ^ 48), ch = gc ();
x = f ? ~x + 1 : x;
}
inline void read (double &x)
{
x = 0;
bool f = 0;
char ch = gc ();
while (ch < '0' || ch > '9') f |= ch == '-', ch = gc ();
while (ch >= '0' && ch <= '9') x = (x * 10) + (ch ^ 48), ch = gc ();
if (ch == '.')
{
double tmp = 1;
ch = getchar();
while(ch >= '0' && ch <= '9') tmp /= 10.0, x += tmp * (ch ^ 48), ch = gc ();
}
x = f ? -x : x;
}
inline void read (long long &x)
{
x = 0;
bool f = 0;
char ch = gc ();
while (ch < '0' || ch > '9') f |= ch == '-', ch = gc ();
while (ch >= '0' && ch <= '9') x = (x << 3) + (x << 1) + (ch ^ 48), ch = gc ();
x = f ? ~x + 1 : x;
}
inline void write (char ch)
{
pc (ch);
}
inline void write (char *s)
{
while (*s) pc (*s++);
}
inline void write (int x)
{
static char c[11];
unsigned p = 0;
if (x < 0) pc ('-'), x = ~x + 1;
if (!x)
{
pc ('0');
return ;
}
while (x) c[++p] = x % 10 ^ 48, x /= 10;
while (p) pc (c[p]), --p;
}
inline void write (double x, int y = 2)
{
static int mul[] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000};
if (x < -1e-12) pc ('-'), x = -x;
x *= mul[y];
int x1 = (int)floor (x);
if (x - floor(x) >= 0.5) ++x1;
int x2 = x1 / mul[y], x3 = x1 - x2 * mul[y];
write (x2);
pc ('.');
for (size_t i = 1; x3 * mul[i] < mul[y]; ++i) pc ('0');
write (x3);
}
inline void write (long long x)
{
static char c[20];
unsigned p = 0;
if (x < 0) pc ('-'), x = ~x + 1;
if (!x)
{
pc ('0');
return ;
}
while (x) c[++p] = x % 10 ^ 48, x /= 10;
while (p) pc (c[p]), --p;
}
template <class T, class... U> inline void read (T &x, U &...t)
{
read (x), read (t...);
}
template <class T, class... U> inline void write (T x, U ...t)
{
write (x), write (t...);
}
}
template <typename T> bool chkMax(T &x, T y) { return (y > x) ? x = y, 1 : 0; }
template <typename T> bool chkMin(T &x, T y) { return (y < x) ? x = y, 1 : 0; }
template <typename T> void inline read(T &x) {
int f = 1; x = 0; char s = getchar();
while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); }
while (s <= '9' && s >= '0') x = x * 10 + (s ^ 48), s = getchar();
x *= f;
}
还有别的吗?请大佬在留言处留言
谢谢嗷嗷嗷