#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
const int N = 100005;
int n, m, u, v, nod, cnt = 0, sz[2 * N], sub[2 * N], num[N], low[N];
long long ans = 0;
bool vis[2 * N];
vector<int> st, com[N], adj[N], cut[2 * N];
vector<vector<int>> bi;
void process(vector<int> &ve)
{
sort(ve.begin(), ve.end());
ve.erase(unique(ve.begin(), ve.end()), ve.end());
++nod;
for (int &v : ve)
{
sz[nod]++;
com[v].push_back(nod);
}
}
void DFS(int u, int p = 0)
{
low[u] = num[u] = ++cnt;
for (int &v : adj[u])
if (v != p)
{
if (num[v] > 0)
low[u] = min(low[u], num[v]);
else
{
st.push_back(u);
DFS(v, u);
low[u] = min(low[u], low[v]);
if (low[v] >= num[u])
{
int v; bi.push_back({});
do
{
v = st.back(); st.pop_back();
bi.back().push_back(v);
} while (u != v);
process(bi.back());
}
}
}
st.push_back(u);
}
int get_subtree(int u, int p = 0)
{
sub[u] = sz[u];
for (int &v : cut[u])
if (v != p)
sub[u] += get_subtree(v, u);
return sub[u];
}
void find_ans(int u, int tot)
{
vis[u] = true;
int ver = cut[u].size(), big = u > n;
ans += 1LL * sz[u] * (sz[u] - 1) * (ver * big + sz[u] - 2);
ans += 2LL * sz[u] * ((ver - 1) * big + sz[u] - 1) * (tot - sz[u]);
int cur = tot - sub[u];
for (int &v : cut[u])
if (!vis[v])
{
find_ans(v, tot);
ans += 2LL * cur * ((ver - 2) * big + sz[u]) * sub[v];
cur += sub[v];
}
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> m;
nod = n;
while (m--)
{
cin >> u >> v;
adj[u].push_back(v);
adj[v].push_back(u);
}
for (int i = 1; i <= n; i++)
if (num[i] == 0)
DFS(i);
for (int i = 1; i <= n; i++)
if (com[i].size() > 1)
{
sz[i] = 1;
for (int &v : com[i])
{
sz[v]--;
cut[i].push_back(v);
cut[v].push_back(i);
}
}
for (int i = 1; i <= nod; i++)
if (!vis[i])
find_ans(i, get_subtree(i));
cout << ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
13 ms |
9728 KB |
Output is correct |
3 |
Correct |
12 ms |
9728 KB |
Output is correct |
4 |
Correct |
10 ms |
9728 KB |
Output is correct |
5 |
Correct |
12 ms |
9728 KB |
Output is correct |
6 |
Correct |
11 ms |
9728 KB |
Output is correct |
7 |
Correct |
11 ms |
9728 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
11 ms |
9728 KB |
Output is correct |
10 |
Correct |
11 ms |
9728 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
12 ms |
9728 KB |
Output is correct |
13 |
Correct |
11 ms |
9728 KB |
Output is correct |
14 |
Correct |
11 ms |
9728 KB |
Output is correct |
15 |
Correct |
11 ms |
9728 KB |
Output is correct |
16 |
Correct |
11 ms |
9728 KB |
Output is correct |
17 |
Correct |
13 ms |
9728 KB |
Output is correct |
18 |
Correct |
12 ms |
9728 KB |
Output is correct |
19 |
Correct |
13 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
10 ms |
9728 KB |
Output is correct |
22 |
Correct |
11 ms |
9772 KB |
Output is correct |
23 |
Correct |
10 ms |
9728 KB |
Output is correct |
24 |
Correct |
11 ms |
9728 KB |
Output is correct |
25 |
Correct |
11 ms |
9728 KB |
Output is correct |
26 |
Correct |
10 ms |
9772 KB |
Output is correct |
27 |
Correct |
11 ms |
9728 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
11 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9728 KB |
Output is correct |
31 |
Correct |
10 ms |
9728 KB |
Output is correct |
32 |
Correct |
11 ms |
9728 KB |
Output is correct |
33 |
Correct |
11 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9700 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
13 ms |
9728 KB |
Output is correct |
3 |
Correct |
12 ms |
9728 KB |
Output is correct |
4 |
Correct |
10 ms |
9728 KB |
Output is correct |
5 |
Correct |
12 ms |
9728 KB |
Output is correct |
6 |
Correct |
11 ms |
9728 KB |
Output is correct |
7 |
Correct |
11 ms |
9728 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
11 ms |
9728 KB |
Output is correct |
10 |
Correct |
11 ms |
9728 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
12 ms |
9728 KB |
Output is correct |
13 |
Correct |
11 ms |
9728 KB |
Output is correct |
14 |
Correct |
11 ms |
9728 KB |
Output is correct |
15 |
Correct |
11 ms |
9728 KB |
Output is correct |
16 |
Correct |
11 ms |
9728 KB |
Output is correct |
17 |
Correct |
13 ms |
9728 KB |
Output is correct |
18 |
Correct |
12 ms |
9728 KB |
Output is correct |
19 |
Correct |
13 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
10 ms |
9728 KB |
Output is correct |
22 |
Correct |
11 ms |
9772 KB |
Output is correct |
23 |
Correct |
10 ms |
9728 KB |
Output is correct |
24 |
Correct |
11 ms |
9728 KB |
Output is correct |
25 |
Correct |
11 ms |
9728 KB |
Output is correct |
26 |
Correct |
10 ms |
9772 KB |
Output is correct |
27 |
Correct |
11 ms |
9728 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
11 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9728 KB |
Output is correct |
31 |
Correct |
10 ms |
9728 KB |
Output is correct |
32 |
Correct |
11 ms |
9728 KB |
Output is correct |
33 |
Correct |
11 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9700 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
36 |
Correct |
11 ms |
9728 KB |
Output is correct |
37 |
Correct |
11 ms |
9728 KB |
Output is correct |
38 |
Correct |
10 ms |
9756 KB |
Output is correct |
39 |
Correct |
11 ms |
9728 KB |
Output is correct |
40 |
Correct |
12 ms |
9728 KB |
Output is correct |
41 |
Correct |
11 ms |
9728 KB |
Output is correct |
42 |
Correct |
12 ms |
9728 KB |
Output is correct |
43 |
Correct |
11 ms |
9728 KB |
Output is correct |
44 |
Correct |
12 ms |
9728 KB |
Output is correct |
45 |
Correct |
12 ms |
9728 KB |
Output is correct |
46 |
Correct |
12 ms |
9728 KB |
Output is correct |
47 |
Correct |
11 ms |
9728 KB |
Output is correct |
48 |
Correct |
11 ms |
9728 KB |
Output is correct |
49 |
Correct |
11 ms |
9728 KB |
Output is correct |
50 |
Correct |
11 ms |
9728 KB |
Output is correct |
51 |
Correct |
11 ms |
9728 KB |
Output is correct |
52 |
Correct |
13 ms |
9728 KB |
Output is correct |
53 |
Correct |
12 ms |
9728 KB |
Output is correct |
54 |
Correct |
11 ms |
9728 KB |
Output is correct |
55 |
Correct |
10 ms |
9756 KB |
Output is correct |
56 |
Correct |
10 ms |
9728 KB |
Output is correct |
57 |
Correct |
10 ms |
9728 KB |
Output is correct |
58 |
Correct |
13 ms |
9728 KB |
Output is correct |
59 |
Correct |
11 ms |
9728 KB |
Output is correct |
60 |
Correct |
11 ms |
9728 KB |
Output is correct |
61 |
Correct |
11 ms |
9728 KB |
Output is correct |
62 |
Correct |
11 ms |
9728 KB |
Output is correct |
63 |
Correct |
11 ms |
9728 KB |
Output is correct |
64 |
Correct |
12 ms |
9728 KB |
Output is correct |
65 |
Correct |
12 ms |
9700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
132 ms |
26816 KB |
Output is correct |
2 |
Correct |
130 ms |
26804 KB |
Output is correct |
3 |
Correct |
229 ms |
30056 KB |
Output is correct |
4 |
Correct |
175 ms |
28068 KB |
Output is correct |
5 |
Correct |
229 ms |
26180 KB |
Output is correct |
6 |
Correct |
250 ms |
29668 KB |
Output is correct |
7 |
Correct |
291 ms |
28196 KB |
Output is correct |
8 |
Correct |
293 ms |
28816 KB |
Output is correct |
9 |
Correct |
273 ms |
27052 KB |
Output is correct |
10 |
Correct |
218 ms |
26408 KB |
Output is correct |
11 |
Correct |
168 ms |
23124 KB |
Output is correct |
12 |
Correct |
172 ms |
22952 KB |
Output is correct |
13 |
Correct |
134 ms |
22232 KB |
Output is correct |
14 |
Correct |
148 ms |
22060 KB |
Output is correct |
15 |
Correct |
114 ms |
20268 KB |
Output is correct |
16 |
Correct |
123 ms |
20100 KB |
Output is correct |
17 |
Correct |
17 ms |
11528 KB |
Output is correct |
18 |
Correct |
16 ms |
11660 KB |
Output is correct |
19 |
Correct |
17 ms |
11528 KB |
Output is correct |
20 |
Correct |
15 ms |
11528 KB |
Output is correct |
21 |
Correct |
15 ms |
11520 KB |
Output is correct |
22 |
Correct |
15 ms |
11520 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
10028 KB |
Output is correct |
2 |
Correct |
15 ms |
9984 KB |
Output is correct |
3 |
Correct |
12 ms |
9984 KB |
Output is correct |
4 |
Correct |
17 ms |
10112 KB |
Output is correct |
5 |
Correct |
13 ms |
10112 KB |
Output is correct |
6 |
Correct |
13 ms |
10112 KB |
Output is correct |
7 |
Correct |
15 ms |
10112 KB |
Output is correct |
8 |
Correct |
12 ms |
9984 KB |
Output is correct |
9 |
Correct |
12 ms |
9984 KB |
Output is correct |
10 |
Correct |
14 ms |
9984 KB |
Output is correct |
11 |
Correct |
14 ms |
9984 KB |
Output is correct |
12 |
Correct |
12 ms |
9984 KB |
Output is correct |
13 |
Correct |
12 ms |
10028 KB |
Output is correct |
14 |
Correct |
11 ms |
9984 KB |
Output is correct |
15 |
Correct |
14 ms |
9984 KB |
Output is correct |
16 |
Correct |
11 ms |
9856 KB |
Output is correct |
17 |
Correct |
12 ms |
9984 KB |
Output is correct |
18 |
Correct |
11 ms |
9984 KB |
Output is correct |
19 |
Correct |
11 ms |
9908 KB |
Output is correct |
20 |
Correct |
11 ms |
9984 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
250 ms |
29280 KB |
Output is correct |
2 |
Correct |
272 ms |
29220 KB |
Output is correct |
3 |
Correct |
226 ms |
29216 KB |
Output is correct |
4 |
Correct |
247 ms |
29212 KB |
Output is correct |
5 |
Correct |
223 ms |
29244 KB |
Output is correct |
6 |
Correct |
337 ms |
37492 KB |
Output is correct |
7 |
Correct |
348 ms |
34436 KB |
Output is correct |
8 |
Correct |
366 ms |
33828 KB |
Output is correct |
9 |
Correct |
315 ms |
32292 KB |
Output is correct |
10 |
Correct |
234 ms |
29300 KB |
Output is correct |
11 |
Correct |
253 ms |
29320 KB |
Output is correct |
12 |
Correct |
263 ms |
29168 KB |
Output is correct |
13 |
Correct |
251 ms |
29220 KB |
Output is correct |
14 |
Correct |
275 ms |
27936 KB |
Output is correct |
15 |
Correct |
223 ms |
26532 KB |
Output is correct |
16 |
Correct |
137 ms |
21416 KB |
Output is correct |
17 |
Correct |
149 ms |
28152 KB |
Output is correct |
18 |
Correct |
185 ms |
28036 KB |
Output is correct |
19 |
Correct |
170 ms |
28188 KB |
Output is correct |
20 |
Correct |
164 ms |
28072 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
9984 KB |
Output is correct |
2 |
Correct |
16 ms |
9984 KB |
Output is correct |
3 |
Correct |
14 ms |
9908 KB |
Output is correct |
4 |
Correct |
14 ms |
9976 KB |
Output is correct |
5 |
Correct |
14 ms |
9956 KB |
Output is correct |
6 |
Correct |
13 ms |
9984 KB |
Output is correct |
7 |
Correct |
13 ms |
9856 KB |
Output is correct |
8 |
Correct |
14 ms |
9848 KB |
Output is correct |
9 |
Correct |
13 ms |
9856 KB |
Output is correct |
10 |
Correct |
15 ms |
9856 KB |
Output is correct |
11 |
Correct |
12 ms |
9856 KB |
Output is correct |
12 |
Correct |
13 ms |
9984 KB |
Output is correct |
13 |
Correct |
12 ms |
9984 KB |
Output is correct |
14 |
Correct |
15 ms |
9984 KB |
Output is correct |
15 |
Correct |
12 ms |
9984 KB |
Output is correct |
16 |
Correct |
12 ms |
9984 KB |
Output is correct |
17 |
Correct |
14 ms |
9984 KB |
Output is correct |
18 |
Correct |
13 ms |
9856 KB |
Output is correct |
19 |
Correct |
12 ms |
9856 KB |
Output is correct |
20 |
Correct |
11 ms |
9856 KB |
Output is correct |
21 |
Correct |
13 ms |
9948 KB |
Output is correct |
22 |
Correct |
12 ms |
9984 KB |
Output is correct |
23 |
Correct |
14 ms |
9856 KB |
Output is correct |
24 |
Correct |
12 ms |
9984 KB |
Output is correct |
25 |
Correct |
12 ms |
9856 KB |
Output is correct |
26 |
Correct |
12 ms |
9856 KB |
Output is correct |
27 |
Correct |
12 ms |
9856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
308 ms |
29220 KB |
Output is correct |
2 |
Correct |
272 ms |
29396 KB |
Output is correct |
3 |
Correct |
267 ms |
27736 KB |
Output is correct |
4 |
Correct |
277 ms |
26664 KB |
Output is correct |
5 |
Correct |
176 ms |
23976 KB |
Output is correct |
6 |
Correct |
174 ms |
22900 KB |
Output is correct |
7 |
Correct |
208 ms |
22312 KB |
Output is correct |
8 |
Correct |
151 ms |
21556 KB |
Output is correct |
9 |
Correct |
145 ms |
21324 KB |
Output is correct |
10 |
Correct |
172 ms |
20976 KB |
Output is correct |
11 |
Correct |
135 ms |
20600 KB |
Output is correct |
12 |
Correct |
157 ms |
20352 KB |
Output is correct |
13 |
Correct |
137 ms |
20444 KB |
Output is correct |
14 |
Correct |
155 ms |
21876 KB |
Output is correct |
15 |
Correct |
349 ms |
34200 KB |
Output is correct |
16 |
Correct |
311 ms |
32464 KB |
Output is correct |
17 |
Correct |
308 ms |
33120 KB |
Output is correct |
18 |
Correct |
306 ms |
30644 KB |
Output is correct |
19 |
Correct |
257 ms |
26512 KB |
Output is correct |
20 |
Correct |
246 ms |
26796 KB |
Output is correct |
21 |
Correct |
273 ms |
26524 KB |
Output is correct |
22 |
Correct |
179 ms |
25004 KB |
Output is correct |
23 |
Correct |
157 ms |
23188 KB |
Output is correct |
24 |
Correct |
221 ms |
28844 KB |
Output is correct |
25 |
Correct |
214 ms |
28812 KB |
Output is correct |
26 |
Correct |
231 ms |
27648 KB |
Output is correct |
27 |
Correct |
234 ms |
27556 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
13 ms |
9728 KB |
Output is correct |
3 |
Correct |
12 ms |
9728 KB |
Output is correct |
4 |
Correct |
10 ms |
9728 KB |
Output is correct |
5 |
Correct |
12 ms |
9728 KB |
Output is correct |
6 |
Correct |
11 ms |
9728 KB |
Output is correct |
7 |
Correct |
11 ms |
9728 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
11 ms |
9728 KB |
Output is correct |
10 |
Correct |
11 ms |
9728 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
12 ms |
9728 KB |
Output is correct |
13 |
Correct |
11 ms |
9728 KB |
Output is correct |
14 |
Correct |
11 ms |
9728 KB |
Output is correct |
15 |
Correct |
11 ms |
9728 KB |
Output is correct |
16 |
Correct |
11 ms |
9728 KB |
Output is correct |
17 |
Correct |
13 ms |
9728 KB |
Output is correct |
18 |
Correct |
12 ms |
9728 KB |
Output is correct |
19 |
Correct |
13 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
10 ms |
9728 KB |
Output is correct |
22 |
Correct |
11 ms |
9772 KB |
Output is correct |
23 |
Correct |
10 ms |
9728 KB |
Output is correct |
24 |
Correct |
11 ms |
9728 KB |
Output is correct |
25 |
Correct |
11 ms |
9728 KB |
Output is correct |
26 |
Correct |
10 ms |
9772 KB |
Output is correct |
27 |
Correct |
11 ms |
9728 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
11 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9728 KB |
Output is correct |
31 |
Correct |
10 ms |
9728 KB |
Output is correct |
32 |
Correct |
11 ms |
9728 KB |
Output is correct |
33 |
Correct |
11 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9700 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
36 |
Correct |
11 ms |
9728 KB |
Output is correct |
37 |
Correct |
11 ms |
9728 KB |
Output is correct |
38 |
Correct |
10 ms |
9756 KB |
Output is correct |
39 |
Correct |
11 ms |
9728 KB |
Output is correct |
40 |
Correct |
12 ms |
9728 KB |
Output is correct |
41 |
Correct |
11 ms |
9728 KB |
Output is correct |
42 |
Correct |
12 ms |
9728 KB |
Output is correct |
43 |
Correct |
11 ms |
9728 KB |
Output is correct |
44 |
Correct |
12 ms |
9728 KB |
Output is correct |
45 |
Correct |
12 ms |
9728 KB |
Output is correct |
46 |
Correct |
12 ms |
9728 KB |
Output is correct |
47 |
Correct |
11 ms |
9728 KB |
Output is correct |
48 |
Correct |
11 ms |
9728 KB |
Output is correct |
49 |
Correct |
11 ms |
9728 KB |
Output is correct |
50 |
Correct |
11 ms |
9728 KB |
Output is correct |
51 |
Correct |
11 ms |
9728 KB |
Output is correct |
52 |
Correct |
13 ms |
9728 KB |
Output is correct |
53 |
Correct |
12 ms |
9728 KB |
Output is correct |
54 |
Correct |
11 ms |
9728 KB |
Output is correct |
55 |
Correct |
10 ms |
9756 KB |
Output is correct |
56 |
Correct |
10 ms |
9728 KB |
Output is correct |
57 |
Correct |
10 ms |
9728 KB |
Output is correct |
58 |
Correct |
13 ms |
9728 KB |
Output is correct |
59 |
Correct |
11 ms |
9728 KB |
Output is correct |
60 |
Correct |
11 ms |
9728 KB |
Output is correct |
61 |
Correct |
11 ms |
9728 KB |
Output is correct |
62 |
Correct |
11 ms |
9728 KB |
Output is correct |
63 |
Correct |
11 ms |
9728 KB |
Output is correct |
64 |
Correct |
12 ms |
9728 KB |
Output is correct |
65 |
Correct |
12 ms |
9700 KB |
Output is correct |
66 |
Correct |
11 ms |
9856 KB |
Output is correct |
67 |
Correct |
11 ms |
9856 KB |
Output is correct |
68 |
Correct |
12 ms |
9856 KB |
Output is correct |
69 |
Correct |
15 ms |
9984 KB |
Output is correct |
70 |
Correct |
12 ms |
9856 KB |
Output is correct |
71 |
Correct |
12 ms |
9856 KB |
Output is correct |
72 |
Correct |
11 ms |
9856 KB |
Output is correct |
73 |
Correct |
14 ms |
9984 KB |
Output is correct |
74 |
Correct |
11 ms |
9856 KB |
Output is correct |
75 |
Correct |
14 ms |
9856 KB |
Output is correct |
76 |
Correct |
11 ms |
9728 KB |
Output is correct |
77 |
Correct |
13 ms |
9856 KB |
Output is correct |
78 |
Correct |
12 ms |
9856 KB |
Output is correct |
79 |
Correct |
13 ms |
9984 KB |
Output is correct |
80 |
Correct |
14 ms |
9856 KB |
Output is correct |
81 |
Correct |
13 ms |
9856 KB |
Output is correct |
82 |
Correct |
13 ms |
9856 KB |
Output is correct |
83 |
Correct |
13 ms |
9984 KB |
Output is correct |
84 |
Correct |
12 ms |
9984 KB |
Output is correct |
85 |
Correct |
14 ms |
9856 KB |
Output is correct |
86 |
Correct |
15 ms |
9856 KB |
Output is correct |
87 |
Correct |
14 ms |
9984 KB |
Output is correct |
88 |
Correct |
14 ms |
9856 KB |
Output is correct |
89 |
Correct |
14 ms |
9956 KB |
Output is correct |
90 |
Correct |
12 ms |
9856 KB |
Output is correct |
91 |
Correct |
15 ms |
9984 KB |
Output is correct |
92 |
Correct |
12 ms |
9984 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
13 ms |
9728 KB |
Output is correct |
3 |
Correct |
12 ms |
9728 KB |
Output is correct |
4 |
Correct |
10 ms |
9728 KB |
Output is correct |
5 |
Correct |
12 ms |
9728 KB |
Output is correct |
6 |
Correct |
11 ms |
9728 KB |
Output is correct |
7 |
Correct |
11 ms |
9728 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
11 ms |
9728 KB |
Output is correct |
10 |
Correct |
11 ms |
9728 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
12 ms |
9728 KB |
Output is correct |
13 |
Correct |
11 ms |
9728 KB |
Output is correct |
14 |
Correct |
11 ms |
9728 KB |
Output is correct |
15 |
Correct |
11 ms |
9728 KB |
Output is correct |
16 |
Correct |
11 ms |
9728 KB |
Output is correct |
17 |
Correct |
13 ms |
9728 KB |
Output is correct |
18 |
Correct |
12 ms |
9728 KB |
Output is correct |
19 |
Correct |
13 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
10 ms |
9728 KB |
Output is correct |
22 |
Correct |
11 ms |
9772 KB |
Output is correct |
23 |
Correct |
10 ms |
9728 KB |
Output is correct |
24 |
Correct |
11 ms |
9728 KB |
Output is correct |
25 |
Correct |
11 ms |
9728 KB |
Output is correct |
26 |
Correct |
10 ms |
9772 KB |
Output is correct |
27 |
Correct |
11 ms |
9728 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
11 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9728 KB |
Output is correct |
31 |
Correct |
10 ms |
9728 KB |
Output is correct |
32 |
Correct |
11 ms |
9728 KB |
Output is correct |
33 |
Correct |
11 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9700 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
36 |
Correct |
11 ms |
9728 KB |
Output is correct |
37 |
Correct |
11 ms |
9728 KB |
Output is correct |
38 |
Correct |
10 ms |
9756 KB |
Output is correct |
39 |
Correct |
11 ms |
9728 KB |
Output is correct |
40 |
Correct |
12 ms |
9728 KB |
Output is correct |
41 |
Correct |
11 ms |
9728 KB |
Output is correct |
42 |
Correct |
12 ms |
9728 KB |
Output is correct |
43 |
Correct |
11 ms |
9728 KB |
Output is correct |
44 |
Correct |
12 ms |
9728 KB |
Output is correct |
45 |
Correct |
12 ms |
9728 KB |
Output is correct |
46 |
Correct |
12 ms |
9728 KB |
Output is correct |
47 |
Correct |
11 ms |
9728 KB |
Output is correct |
48 |
Correct |
11 ms |
9728 KB |
Output is correct |
49 |
Correct |
11 ms |
9728 KB |
Output is correct |
50 |
Correct |
11 ms |
9728 KB |
Output is correct |
51 |
Correct |
11 ms |
9728 KB |
Output is correct |
52 |
Correct |
13 ms |
9728 KB |
Output is correct |
53 |
Correct |
12 ms |
9728 KB |
Output is correct |
54 |
Correct |
11 ms |
9728 KB |
Output is correct |
55 |
Correct |
10 ms |
9756 KB |
Output is correct |
56 |
Correct |
10 ms |
9728 KB |
Output is correct |
57 |
Correct |
10 ms |
9728 KB |
Output is correct |
58 |
Correct |
13 ms |
9728 KB |
Output is correct |
59 |
Correct |
11 ms |
9728 KB |
Output is correct |
60 |
Correct |
11 ms |
9728 KB |
Output is correct |
61 |
Correct |
11 ms |
9728 KB |
Output is correct |
62 |
Correct |
11 ms |
9728 KB |
Output is correct |
63 |
Correct |
11 ms |
9728 KB |
Output is correct |
64 |
Correct |
12 ms |
9728 KB |
Output is correct |
65 |
Correct |
12 ms |
9700 KB |
Output is correct |
66 |
Correct |
132 ms |
26816 KB |
Output is correct |
67 |
Correct |
130 ms |
26804 KB |
Output is correct |
68 |
Correct |
229 ms |
30056 KB |
Output is correct |
69 |
Correct |
175 ms |
28068 KB |
Output is correct |
70 |
Correct |
229 ms |
26180 KB |
Output is correct |
71 |
Correct |
250 ms |
29668 KB |
Output is correct |
72 |
Correct |
291 ms |
28196 KB |
Output is correct |
73 |
Correct |
293 ms |
28816 KB |
Output is correct |
74 |
Correct |
273 ms |
27052 KB |
Output is correct |
75 |
Correct |
218 ms |
26408 KB |
Output is correct |
76 |
Correct |
168 ms |
23124 KB |
Output is correct |
77 |
Correct |
172 ms |
22952 KB |
Output is correct |
78 |
Correct |
134 ms |
22232 KB |
Output is correct |
79 |
Correct |
148 ms |
22060 KB |
Output is correct |
80 |
Correct |
114 ms |
20268 KB |
Output is correct |
81 |
Correct |
123 ms |
20100 KB |
Output is correct |
82 |
Correct |
17 ms |
11528 KB |
Output is correct |
83 |
Correct |
16 ms |
11660 KB |
Output is correct |
84 |
Correct |
17 ms |
11528 KB |
Output is correct |
85 |
Correct |
15 ms |
11528 KB |
Output is correct |
86 |
Correct |
15 ms |
11520 KB |
Output is correct |
87 |
Correct |
15 ms |
11520 KB |
Output is correct |
88 |
Correct |
11 ms |
10028 KB |
Output is correct |
89 |
Correct |
15 ms |
9984 KB |
Output is correct |
90 |
Correct |
12 ms |
9984 KB |
Output is correct |
91 |
Correct |
17 ms |
10112 KB |
Output is correct |
92 |
Correct |
13 ms |
10112 KB |
Output is correct |
93 |
Correct |
13 ms |
10112 KB |
Output is correct |
94 |
Correct |
15 ms |
10112 KB |
Output is correct |
95 |
Correct |
12 ms |
9984 KB |
Output is correct |
96 |
Correct |
12 ms |
9984 KB |
Output is correct |
97 |
Correct |
14 ms |
9984 KB |
Output is correct |
98 |
Correct |
14 ms |
9984 KB |
Output is correct |
99 |
Correct |
12 ms |
9984 KB |
Output is correct |
100 |
Correct |
12 ms |
10028 KB |
Output is correct |
101 |
Correct |
11 ms |
9984 KB |
Output is correct |
102 |
Correct |
14 ms |
9984 KB |
Output is correct |
103 |
Correct |
11 ms |
9856 KB |
Output is correct |
104 |
Correct |
12 ms |
9984 KB |
Output is correct |
105 |
Correct |
11 ms |
9984 KB |
Output is correct |
106 |
Correct |
11 ms |
9908 KB |
Output is correct |
107 |
Correct |
11 ms |
9984 KB |
Output is correct |
108 |
Correct |
250 ms |
29280 KB |
Output is correct |
109 |
Correct |
272 ms |
29220 KB |
Output is correct |
110 |
Correct |
226 ms |
29216 KB |
Output is correct |
111 |
Correct |
247 ms |
29212 KB |
Output is correct |
112 |
Correct |
223 ms |
29244 KB |
Output is correct |
113 |
Correct |
337 ms |
37492 KB |
Output is correct |
114 |
Correct |
348 ms |
34436 KB |
Output is correct |
115 |
Correct |
366 ms |
33828 KB |
Output is correct |
116 |
Correct |
315 ms |
32292 KB |
Output is correct |
117 |
Correct |
234 ms |
29300 KB |
Output is correct |
118 |
Correct |
253 ms |
29320 KB |
Output is correct |
119 |
Correct |
263 ms |
29168 KB |
Output is correct |
120 |
Correct |
251 ms |
29220 KB |
Output is correct |
121 |
Correct |
275 ms |
27936 KB |
Output is correct |
122 |
Correct |
223 ms |
26532 KB |
Output is correct |
123 |
Correct |
137 ms |
21416 KB |
Output is correct |
124 |
Correct |
149 ms |
28152 KB |
Output is correct |
125 |
Correct |
185 ms |
28036 KB |
Output is correct |
126 |
Correct |
170 ms |
28188 KB |
Output is correct |
127 |
Correct |
164 ms |
28072 KB |
Output is correct |
128 |
Correct |
9 ms |
9984 KB |
Output is correct |
129 |
Correct |
16 ms |
9984 KB |
Output is correct |
130 |
Correct |
14 ms |
9908 KB |
Output is correct |
131 |
Correct |
14 ms |
9976 KB |
Output is correct |
132 |
Correct |
14 ms |
9956 KB |
Output is correct |
133 |
Correct |
13 ms |
9984 KB |
Output is correct |
134 |
Correct |
13 ms |
9856 KB |
Output is correct |
135 |
Correct |
14 ms |
9848 KB |
Output is correct |
136 |
Correct |
13 ms |
9856 KB |
Output is correct |
137 |
Correct |
15 ms |
9856 KB |
Output is correct |
138 |
Correct |
12 ms |
9856 KB |
Output is correct |
139 |
Correct |
13 ms |
9984 KB |
Output is correct |
140 |
Correct |
12 ms |
9984 KB |
Output is correct |
141 |
Correct |
15 ms |
9984 KB |
Output is correct |
142 |
Correct |
12 ms |
9984 KB |
Output is correct |
143 |
Correct |
12 ms |
9984 KB |
Output is correct |
144 |
Correct |
14 ms |
9984 KB |
Output is correct |
145 |
Correct |
13 ms |
9856 KB |
Output is correct |
146 |
Correct |
12 ms |
9856 KB |
Output is correct |
147 |
Correct |
11 ms |
9856 KB |
Output is correct |
148 |
Correct |
13 ms |
9948 KB |
Output is correct |
149 |
Correct |
12 ms |
9984 KB |
Output is correct |
150 |
Correct |
14 ms |
9856 KB |
Output is correct |
151 |
Correct |
12 ms |
9984 KB |
Output is correct |
152 |
Correct |
12 ms |
9856 KB |
Output is correct |
153 |
Correct |
12 ms |
9856 KB |
Output is correct |
154 |
Correct |
12 ms |
9856 KB |
Output is correct |
155 |
Correct |
308 ms |
29220 KB |
Output is correct |
156 |
Correct |
272 ms |
29396 KB |
Output is correct |
157 |
Correct |
267 ms |
27736 KB |
Output is correct |
158 |
Correct |
277 ms |
26664 KB |
Output is correct |
159 |
Correct |
176 ms |
23976 KB |
Output is correct |
160 |
Correct |
174 ms |
22900 KB |
Output is correct |
161 |
Correct |
208 ms |
22312 KB |
Output is correct |
162 |
Correct |
151 ms |
21556 KB |
Output is correct |
163 |
Correct |
145 ms |
21324 KB |
Output is correct |
164 |
Correct |
172 ms |
20976 KB |
Output is correct |
165 |
Correct |
135 ms |
20600 KB |
Output is correct |
166 |
Correct |
157 ms |
20352 KB |
Output is correct |
167 |
Correct |
137 ms |
20444 KB |
Output is correct |
168 |
Correct |
155 ms |
21876 KB |
Output is correct |
169 |
Correct |
349 ms |
34200 KB |
Output is correct |
170 |
Correct |
311 ms |
32464 KB |
Output is correct |
171 |
Correct |
308 ms |
33120 KB |
Output is correct |
172 |
Correct |
306 ms |
30644 KB |
Output is correct |
173 |
Correct |
257 ms |
26512 KB |
Output is correct |
174 |
Correct |
246 ms |
26796 KB |
Output is correct |
175 |
Correct |
273 ms |
26524 KB |
Output is correct |
176 |
Correct |
179 ms |
25004 KB |
Output is correct |
177 |
Correct |
157 ms |
23188 KB |
Output is correct |
178 |
Correct |
221 ms |
28844 KB |
Output is correct |
179 |
Correct |
214 ms |
28812 KB |
Output is correct |
180 |
Correct |
231 ms |
27648 KB |
Output is correct |
181 |
Correct |
234 ms |
27556 KB |
Output is correct |
182 |
Correct |
11 ms |
9856 KB |
Output is correct |
183 |
Correct |
11 ms |
9856 KB |
Output is correct |
184 |
Correct |
12 ms |
9856 KB |
Output is correct |
185 |
Correct |
15 ms |
9984 KB |
Output is correct |
186 |
Correct |
12 ms |
9856 KB |
Output is correct |
187 |
Correct |
12 ms |
9856 KB |
Output is correct |
188 |
Correct |
11 ms |
9856 KB |
Output is correct |
189 |
Correct |
14 ms |
9984 KB |
Output is correct |
190 |
Correct |
11 ms |
9856 KB |
Output is correct |
191 |
Correct |
14 ms |
9856 KB |
Output is correct |
192 |
Correct |
11 ms |
9728 KB |
Output is correct |
193 |
Correct |
13 ms |
9856 KB |
Output is correct |
194 |
Correct |
12 ms |
9856 KB |
Output is correct |
195 |
Correct |
13 ms |
9984 KB |
Output is correct |
196 |
Correct |
14 ms |
9856 KB |
Output is correct |
197 |
Correct |
13 ms |
9856 KB |
Output is correct |
198 |
Correct |
13 ms |
9856 KB |
Output is correct |
199 |
Correct |
13 ms |
9984 KB |
Output is correct |
200 |
Correct |
12 ms |
9984 KB |
Output is correct |
201 |
Correct |
14 ms |
9856 KB |
Output is correct |
202 |
Correct |
15 ms |
9856 KB |
Output is correct |
203 |
Correct |
14 ms |
9984 KB |
Output is correct |
204 |
Correct |
14 ms |
9856 KB |
Output is correct |
205 |
Correct |
14 ms |
9956 KB |
Output is correct |
206 |
Correct |
12 ms |
9856 KB |
Output is correct |
207 |
Correct |
15 ms |
9984 KB |
Output is correct |
208 |
Correct |
12 ms |
9984 KB |
Output is correct |
209 |
Correct |
17 ms |
11516 KB |
Output is correct |
210 |
Correct |
191 ms |
21548 KB |
Output is correct |
211 |
Correct |
206 ms |
25376 KB |
Output is correct |
212 |
Correct |
286 ms |
26652 KB |
Output is correct |
213 |
Correct |
276 ms |
27884 KB |
Output is correct |
214 |
Correct |
91 ms |
23340 KB |
Output is correct |
215 |
Correct |
109 ms |
22432 KB |
Output is correct |
216 |
Correct |
295 ms |
27236 KB |
Output is correct |
217 |
Correct |
212 ms |
24368 KB |
Output is correct |
218 |
Correct |
177 ms |
21684 KB |
Output is correct |
219 |
Correct |
189 ms |
21000 KB |
Output is correct |
220 |
Correct |
169 ms |
20736 KB |
Output is correct |
221 |
Correct |
137 ms |
20216 KB |
Output is correct |
222 |
Correct |
135 ms |
20852 KB |
Output is correct |
223 |
Correct |
304 ms |
27164 KB |
Output is correct |
224 |
Correct |
196 ms |
26796 KB |
Output is correct |
225 |
Correct |
219 ms |
23792 KB |
Output is correct |
226 |
Correct |
190 ms |
23720 KB |
Output is correct |
227 |
Correct |
190 ms |
23776 KB |
Output is correct |
228 |
Correct |
203 ms |
22852 KB |
Output is correct |
229 |
Correct |
172 ms |
21708 KB |
Output is correct |
230 |
Correct |
199 ms |
23776 KB |
Output is correct |
231 |
Correct |
192 ms |
23988 KB |
Output is correct |