低配快读

😅低配快读😅

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
namespace IO
{
inline int read()
{
int x = 0, f = 1;
char ch = getchar();
while(!isdigit(ch))
{
if(ch == '-')
f = -1;
ch = getchar();
}
while(isdigit(ch))
{
x =((x << 3) + (x << 1)) + (ch ^ 48);
ch = getchar();
}
return x * f;
}
inline void write(int x)
{
char ch[100];
int len = 0;
ch[++len] = '\n';
if(x == 0)
ch[++len] = '0';
if(x < 0)
putchar('-'), x = -x;
while(x != 0)
{
ch[++len] = x % 10 + '0';
x /= 10;
}
while(len)
putchar(ch[len--]);
}
inline long long readL()
{
long long x = 0, f = 1;
char ch = getchar();
while(!isdigit(ch))
{
if(ch == '-')
f = -1;
ch = getchar();
}
while(isdigit(ch))
{
x =((x << 3ll) + (x << 1ll)) + (ch ^ 48ll);
ch = getchar();
}
return x * f;
}
inline void writeL(long long x)
{
char ch[100];
int len = 0;
ch[++len] = '\n';
if(x == 0)
ch[++len] = '0';
if(x < 0)
putchar('-'), x = -x;
while(x != 0)
{
ch[++len] = x % 10ll + '0';
x /= 10ll;
}
while(len)
putchar(ch[len--]);
}
inline string readS()
{
string str = "";
char ch = getchar();
while(ch == ' ' || ch == '\n')
ch = getchar();
while(ch != ' ' && ch != '\n')
{
str += ch;
ch = getchar();
}
return str;
}
inline void writeS(string s)
{
for(int i = 0; i < s.size(); i++)
putchar(s[i]);
putchar('\n');
}
inline double readD()
{
double x = 0, f = 1, k = 0.1;
char ch = getchar();
while(ch == ' ' || ch == '\n' || ch == '-')
{
if(ch == '-')
f = -1;
ch = getchar();
}
while(isdigit(ch))
{
x = x * 10 + (ch ^ 48);
ch = getchar();
}
if(ch == '.')
{
ch = getchar();
while(isdigit(ch))
{
x = x + 1.0 * (ch ^ 48) * k;
k *= 0.1;
ch = getchar();
}
}
return x * f;
}
#define writeD(x, a) printf("%."#a"lf", x)
}

using namespace IO;
作者

Jekyll_Y

发布于

2022-11-19

更新于

2023-03-02

许可协议

评论