快读
void read(int &a)
{
a = 0;
char c;
while ((c = getchar()) < 48);
do a = a * 10 + (c ^ 48);
while ((c = getchar()) > 47);
}快写
void write(int x)
{
static int sta[35];
int top = 0;
do
{
sta[top++] = x % 10;
x /= 10;
} while (x);
while (top) putchar(sta[--top] + '0');
}