#include <bits/stdc++.h>
using namespace std;
void just_do_it();
int main() {
#ifdef KAMIRULEZ
freopen("kamirulez.inp", "r", stdin);
freopen("kamirulez.out", "w", stdout);
#endif
ios_base::sync_with_stdio(0);
cin.tie(0);
just_do_it();
return 0;
}
const int maxn = 1e5 + 20;
vector<int> adj[maxn];
vector<int> comp;
bool can[55][55][55];
bool bad[maxn];
bool flag[maxn];
int par[maxn];
int depth[maxn];
int high[maxn];
int sz[maxn];
int node_cnt = 0;
int edge_cnt = 0;
int n, m;
void dfs1(int x, int a, int b) {
can[x][a][b] = true;
for (auto c: adj[b]) {
if (c != x && !can[x][a][c]) {
dfs1(x, a, c);
}
}
}
void dfs2(int u, int p) {
par[u] = p;
high[u] = depth[u];
comp.push_back(u);
flag[u] = true;
node_cnt++;
edge_cnt += adj[u].size();
sz[u] = 1;
for (auto v: adj[u]) {
if (v == p) {
continue;
}
if (!flag[v]) {
depth[v] = depth[u] + 1;
dfs2(v, u);
sz[u] += sz[v];
high[u] = min(high[u], high[v]);
}
else {
high[u] = min(high[u], depth[v]);
}
}
}
void sub1() {
for (int x = 1; x <= n; x++) {
for (int a = 1; a <= n; a++) {
if (a != x) {
dfs1(x, a, a);
}
}
bad[x] = false;
}
int res = 0;
for (int a = 1; a <= n; a++) {
for (int b = 1; b <= n; b++) {
if (b == a) {
continue;
}
for (int c = 1; c <= n; c++) {
if (c == a || c == b) {
continue;
}
bool ok = true;
for (int x = 1; x <= n; x++) {
if (x == b) {
continue;
}
if (!can[x][a][b] && !can[x][b][c]) {
ok = false;
break;
}
}
if (ok) {
res++;
}
}
}
}
cout << res;
}
long long solve(int root) {
comp.clear();
node_cnt = 0;
edge_cnt = 0;
dfs2(root, -1);
edge_cnt /= 2;
if (node_cnt == edge_cnt) {
return 1LL * node_cnt * (node_cnt - 1) * (node_cnt - 2);
}
long long res = 0;
for (auto u: comp) {
res += 1LL * sz[u] * (node_cnt - sz[u]) * 2;
}
res -= 1LL * node_cnt * (node_cnt - 1);
return res;
}
long long dfs3(int u) {
int cnt = 1;
for (auto v: adj[u]) {
if (par[v] == u && high[v] >= depth[u]) {
cnt += sz[v];
}
}
long long res = 1LL * cnt * (cnt - 1);
for (auto v: adj[u]) {
if (par[v] == u && high[v] < depth[u]) {
res += dfs3(v);
}
}
return res;
}
void sub8() {
long long res = 0;
for (int u = 1; u <= n; u++) {
node_cnt = 0;
for (int i = 1; i <= n; i++) {
flag[i] = false;
}
depth[u] = 0;
dfs2(u, -1);
res += 1LL * (node_cnt - 1) * (node_cnt - 2);
for (auto v: adj[u]) {
if (par[v] == u) {
res -= dfs3(v);
}
}
}
cout << res;
}
void just_do_it() {
cin >> n >> m;
for (int i = 0; i < m; i++) {
int u, v;
cin >> u >> v;
adj[u].push_back(v);
adj[v].push_back(u);
}
if (n <= 50) {
sub1();
return;
}
if (n <= 2000) {
sub8();
return;
}
long long res = 0;
for (int i = 1; i <= n; i++) {
if (!flag[i]) {
res += solve(i);
}
}
cout << res;
return;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2644 KB |
Output is correct |
2 |
Correct |
2 ms |
2684 KB |
Output is correct |
3 |
Correct |
2 ms |
2680 KB |
Output is correct |
4 |
Correct |
2 ms |
2644 KB |
Output is correct |
5 |
Correct |
1 ms |
2676 KB |
Output is correct |
6 |
Correct |
2 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
2 ms |
2680 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2680 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2676 KB |
Output is correct |
14 |
Correct |
2 ms |
2676 KB |
Output is correct |
15 |
Correct |
1 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
2644 KB |
Output is correct |
25 |
Correct |
1 ms |
2680 KB |
Output is correct |
26 |
Correct |
2 ms |
2644 KB |
Output is correct |
27 |
Correct |
1 ms |
2644 KB |
Output is correct |
28 |
Correct |
2 ms |
2644 KB |
Output is correct |
29 |
Correct |
2 ms |
2644 KB |
Output is correct |
30 |
Correct |
2 ms |
2676 KB |
Output is correct |
31 |
Correct |
2 ms |
2640 KB |
Output is correct |
32 |
Correct |
2 ms |
2680 KB |
Output is correct |
33 |
Correct |
2 ms |
2676 KB |
Output is correct |
34 |
Correct |
2 ms |
2644 KB |
Output is correct |
35 |
Correct |
1 ms |
2644 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2644 KB |
Output is correct |
2 |
Correct |
2 ms |
2684 KB |
Output is correct |
3 |
Correct |
2 ms |
2680 KB |
Output is correct |
4 |
Correct |
2 ms |
2644 KB |
Output is correct |
5 |
Correct |
1 ms |
2676 KB |
Output is correct |
6 |
Correct |
2 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
2 ms |
2680 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2680 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2676 KB |
Output is correct |
14 |
Correct |
2 ms |
2676 KB |
Output is correct |
15 |
Correct |
1 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
2644 KB |
Output is correct |
25 |
Correct |
1 ms |
2680 KB |
Output is correct |
26 |
Correct |
2 ms |
2644 KB |
Output is correct |
27 |
Correct |
1 ms |
2644 KB |
Output is correct |
28 |
Correct |
2 ms |
2644 KB |
Output is correct |
29 |
Correct |
2 ms |
2644 KB |
Output is correct |
30 |
Correct |
2 ms |
2676 KB |
Output is correct |
31 |
Correct |
2 ms |
2640 KB |
Output is correct |
32 |
Correct |
2 ms |
2680 KB |
Output is correct |
33 |
Correct |
2 ms |
2676 KB |
Output is correct |
34 |
Correct |
2 ms |
2644 KB |
Output is correct |
35 |
Correct |
1 ms |
2644 KB |
Output is correct |
36 |
Correct |
2 ms |
2772 KB |
Output is correct |
37 |
Correct |
3 ms |
2808 KB |
Output is correct |
38 |
Correct |
10 ms |
2772 KB |
Output is correct |
39 |
Correct |
11 ms |
2772 KB |
Output is correct |
40 |
Correct |
11 ms |
2840 KB |
Output is correct |
41 |
Correct |
2 ms |
2772 KB |
Output is correct |
42 |
Correct |
3 ms |
2772 KB |
Output is correct |
43 |
Correct |
2 ms |
2772 KB |
Output is correct |
44 |
Correct |
2 ms |
2772 KB |
Output is correct |
45 |
Correct |
4 ms |
2772 KB |
Output is correct |
46 |
Correct |
3 ms |
2900 KB |
Output is correct |
47 |
Correct |
2 ms |
2644 KB |
Output is correct |
48 |
Correct |
3 ms |
2772 KB |
Output is correct |
49 |
Correct |
2 ms |
2804 KB |
Output is correct |
50 |
Correct |
2 ms |
2772 KB |
Output is correct |
51 |
Correct |
9 ms |
2836 KB |
Output is correct |
52 |
Correct |
8 ms |
2772 KB |
Output is correct |
53 |
Correct |
10 ms |
2804 KB |
Output is correct |
54 |
Correct |
10 ms |
2804 KB |
Output is correct |
55 |
Correct |
11 ms |
2808 KB |
Output is correct |
56 |
Correct |
9 ms |
2772 KB |
Output is correct |
57 |
Correct |
10 ms |
2804 KB |
Output is correct |
58 |
Correct |
8 ms |
2772 KB |
Output is correct |
59 |
Correct |
7 ms |
2812 KB |
Output is correct |
60 |
Correct |
5 ms |
2772 KB |
Output is correct |
61 |
Correct |
4 ms |
2804 KB |
Output is correct |
62 |
Correct |
3 ms |
2772 KB |
Output is correct |
63 |
Correct |
9 ms |
2772 KB |
Output is correct |
64 |
Correct |
7 ms |
2772 KB |
Output is correct |
65 |
Correct |
6 ms |
2772 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
61 ms |
16708 KB |
Output is correct |
2 |
Correct |
57 ms |
16608 KB |
Output is correct |
3 |
Correct |
57 ms |
12508 KB |
Output is correct |
4 |
Correct |
52 ms |
14576 KB |
Output is correct |
5 |
Correct |
57 ms |
11196 KB |
Output is correct |
6 |
Correct |
49 ms |
11260 KB |
Output is correct |
7 |
Correct |
55 ms |
10156 KB |
Output is correct |
8 |
Correct |
53 ms |
10724 KB |
Output is correct |
9 |
Correct |
47 ms |
9164 KB |
Output is correct |
10 |
Correct |
60 ms |
10060 KB |
Output is correct |
11 |
Correct |
39 ms |
8304 KB |
Output is correct |
12 |
Correct |
42 ms |
8140 KB |
Output is correct |
13 |
Correct |
39 ms |
8208 KB |
Output is correct |
14 |
Correct |
39 ms |
8084 KB |
Output is correct |
15 |
Correct |
25 ms |
7460 KB |
Output is correct |
16 |
Correct |
27 ms |
7436 KB |
Output is correct |
17 |
Correct |
3 ms |
4180 KB |
Output is correct |
18 |
Correct |
5 ms |
4216 KB |
Output is correct |
19 |
Correct |
4 ms |
4180 KB |
Output is correct |
20 |
Correct |
4 ms |
4180 KB |
Output is correct |
21 |
Correct |
3 ms |
4180 KB |
Output is correct |
22 |
Correct |
3 ms |
4052 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
28 ms |
6988 KB |
Output is correct |
2 |
Correct |
28 ms |
6900 KB |
Output is correct |
3 |
Correct |
27 ms |
6984 KB |
Output is correct |
4 |
Correct |
35 ms |
7180 KB |
Output is correct |
5 |
Correct |
31 ms |
6976 KB |
Output is correct |
6 |
Correct |
29 ms |
6956 KB |
Output is correct |
7 |
Correct |
33 ms |
6952 KB |
Output is correct |
8 |
Correct |
29 ms |
6972 KB |
Output is correct |
9 |
Correct |
28 ms |
6984 KB |
Output is correct |
10 |
Correct |
21 ms |
6904 KB |
Output is correct |
11 |
Correct |
20 ms |
7000 KB |
Output is correct |
12 |
Correct |
12 ms |
4944 KB |
Output is correct |
13 |
Correct |
7 ms |
3924 KB |
Output is correct |
14 |
Correct |
3 ms |
2900 KB |
Output is correct |
15 |
Correct |
2 ms |
2804 KB |
Output is correct |
16 |
Correct |
2 ms |
2724 KB |
Output is correct |
17 |
Correct |
20 ms |
7000 KB |
Output is correct |
18 |
Correct |
19 ms |
6980 KB |
Output is correct |
19 |
Correct |
18 ms |
6896 KB |
Output is correct |
20 |
Correct |
18 ms |
6980 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
52 ms |
9160 KB |
Output is correct |
2 |
Correct |
46 ms |
9116 KB |
Output is correct |
3 |
Correct |
45 ms |
9012 KB |
Output is correct |
4 |
Correct |
46 ms |
9080 KB |
Output is correct |
5 |
Correct |
48 ms |
9104 KB |
Output is correct |
6 |
Correct |
59 ms |
13184 KB |
Output is correct |
7 |
Correct |
57 ms |
11676 KB |
Output is correct |
8 |
Correct |
58 ms |
10976 KB |
Output is correct |
9 |
Correct |
46 ms |
10376 KB |
Output is correct |
10 |
Correct |
54 ms |
8848 KB |
Output is correct |
11 |
Correct |
49 ms |
9052 KB |
Output is correct |
12 |
Correct |
45 ms |
8612 KB |
Output is correct |
13 |
Correct |
52 ms |
8688 KB |
Output is correct |
14 |
Correct |
39 ms |
8368 KB |
Output is correct |
15 |
Correct |
36 ms |
8184 KB |
Output is correct |
16 |
Correct |
21 ms |
7276 KB |
Output is correct |
17 |
Correct |
34 ms |
9520 KB |
Output is correct |
18 |
Correct |
33 ms |
9388 KB |
Output is correct |
19 |
Correct |
34 ms |
9412 KB |
Output is correct |
20 |
Correct |
35 ms |
9340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
26 ms |
6988 KB |
Output is correct |
2 |
Correct |
26 ms |
6896 KB |
Output is correct |
3 |
Correct |
31 ms |
6984 KB |
Output is correct |
4 |
Correct |
30 ms |
6900 KB |
Output is correct |
5 |
Correct |
30 ms |
6896 KB |
Output is correct |
6 |
Correct |
32 ms |
6932 KB |
Output is correct |
7 |
Correct |
30 ms |
6876 KB |
Output is correct |
8 |
Correct |
30 ms |
6900 KB |
Output is correct |
9 |
Correct |
33 ms |
6932 KB |
Output is correct |
10 |
Correct |
36 ms |
7036 KB |
Output is correct |
11 |
Correct |
31 ms |
6944 KB |
Output is correct |
12 |
Correct |
31 ms |
7020 KB |
Output is correct |
13 |
Correct |
32 ms |
6984 KB |
Output is correct |
14 |
Correct |
32 ms |
7000 KB |
Output is correct |
15 |
Correct |
32 ms |
6976 KB |
Output is correct |
16 |
Correct |
24 ms |
6904 KB |
Output is correct |
17 |
Correct |
20 ms |
6976 KB |
Output is correct |
18 |
Correct |
9 ms |
3920 KB |
Output is correct |
19 |
Correct |
4 ms |
2772 KB |
Output is correct |
20 |
Correct |
2 ms |
2772 KB |
Output is correct |
21 |
Correct |
30 ms |
6936 KB |
Output is correct |
22 |
Correct |
30 ms |
6980 KB |
Output is correct |
23 |
Correct |
28 ms |
6892 KB |
Output is correct |
24 |
Correct |
28 ms |
6896 KB |
Output is correct |
25 |
Correct |
2 ms |
2676 KB |
Output is correct |
26 |
Correct |
2 ms |
2644 KB |
Output is correct |
27 |
Correct |
2 ms |
2676 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
55 ms |
9092 KB |
Output is correct |
2 |
Correct |
47 ms |
9036 KB |
Output is correct |
3 |
Incorrect |
69 ms |
9036 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2644 KB |
Output is correct |
2 |
Correct |
2 ms |
2684 KB |
Output is correct |
3 |
Correct |
2 ms |
2680 KB |
Output is correct |
4 |
Correct |
2 ms |
2644 KB |
Output is correct |
5 |
Correct |
1 ms |
2676 KB |
Output is correct |
6 |
Correct |
2 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
2 ms |
2680 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2680 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2676 KB |
Output is correct |
14 |
Correct |
2 ms |
2676 KB |
Output is correct |
15 |
Correct |
1 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
2644 KB |
Output is correct |
25 |
Correct |
1 ms |
2680 KB |
Output is correct |
26 |
Correct |
2 ms |
2644 KB |
Output is correct |
27 |
Correct |
1 ms |
2644 KB |
Output is correct |
28 |
Correct |
2 ms |
2644 KB |
Output is correct |
29 |
Correct |
2 ms |
2644 KB |
Output is correct |
30 |
Correct |
2 ms |
2676 KB |
Output is correct |
31 |
Correct |
2 ms |
2640 KB |
Output is correct |
32 |
Correct |
2 ms |
2680 KB |
Output is correct |
33 |
Correct |
2 ms |
2676 KB |
Output is correct |
34 |
Correct |
2 ms |
2644 KB |
Output is correct |
35 |
Correct |
1 ms |
2644 KB |
Output is correct |
36 |
Correct |
2 ms |
2772 KB |
Output is correct |
37 |
Correct |
3 ms |
2808 KB |
Output is correct |
38 |
Correct |
10 ms |
2772 KB |
Output is correct |
39 |
Correct |
11 ms |
2772 KB |
Output is correct |
40 |
Correct |
11 ms |
2840 KB |
Output is correct |
41 |
Correct |
2 ms |
2772 KB |
Output is correct |
42 |
Correct |
3 ms |
2772 KB |
Output is correct |
43 |
Correct |
2 ms |
2772 KB |
Output is correct |
44 |
Correct |
2 ms |
2772 KB |
Output is correct |
45 |
Correct |
4 ms |
2772 KB |
Output is correct |
46 |
Correct |
3 ms |
2900 KB |
Output is correct |
47 |
Correct |
2 ms |
2644 KB |
Output is correct |
48 |
Correct |
3 ms |
2772 KB |
Output is correct |
49 |
Correct |
2 ms |
2804 KB |
Output is correct |
50 |
Correct |
2 ms |
2772 KB |
Output is correct |
51 |
Correct |
9 ms |
2836 KB |
Output is correct |
52 |
Correct |
8 ms |
2772 KB |
Output is correct |
53 |
Correct |
10 ms |
2804 KB |
Output is correct |
54 |
Correct |
10 ms |
2804 KB |
Output is correct |
55 |
Correct |
11 ms |
2808 KB |
Output is correct |
56 |
Correct |
9 ms |
2772 KB |
Output is correct |
57 |
Correct |
10 ms |
2804 KB |
Output is correct |
58 |
Correct |
8 ms |
2772 KB |
Output is correct |
59 |
Correct |
7 ms |
2812 KB |
Output is correct |
60 |
Correct |
5 ms |
2772 KB |
Output is correct |
61 |
Correct |
4 ms |
2804 KB |
Output is correct |
62 |
Correct |
3 ms |
2772 KB |
Output is correct |
63 |
Correct |
9 ms |
2772 KB |
Output is correct |
64 |
Correct |
7 ms |
2772 KB |
Output is correct |
65 |
Correct |
6 ms |
2772 KB |
Output is correct |
66 |
Correct |
2 ms |
2644 KB |
Output is correct |
67 |
Correct |
3 ms |
2936 KB |
Output is correct |
68 |
Correct |
36 ms |
6956 KB |
Output is correct |
69 |
Correct |
78 ms |
7024 KB |
Output is correct |
70 |
Correct |
84 ms |
6968 KB |
Output is correct |
71 |
Correct |
2 ms |
2772 KB |
Output is correct |
72 |
Correct |
2 ms |
2772 KB |
Output is correct |
73 |
Correct |
2 ms |
2772 KB |
Output is correct |
74 |
Correct |
2 ms |
2772 KB |
Output is correct |
75 |
Correct |
2 ms |
2688 KB |
Output is correct |
76 |
Correct |
2 ms |
2636 KB |
Output is correct |
77 |
Correct |
28 ms |
6908 KB |
Output is correct |
78 |
Correct |
29 ms |
6988 KB |
Output is correct |
79 |
Correct |
30 ms |
6992 KB |
Output is correct |
80 |
Correct |
31 ms |
6976 KB |
Output is correct |
81 |
Correct |
31 ms |
6984 KB |
Output is correct |
82 |
Correct |
36 ms |
6980 KB |
Output is correct |
83 |
Correct |
45 ms |
7016 KB |
Output is correct |
84 |
Correct |
31 ms |
6984 KB |
Output is correct |
85 |
Correct |
33 ms |
6984 KB |
Output is correct |
86 |
Correct |
28 ms |
6988 KB |
Output is correct |
87 |
Correct |
13 ms |
4884 KB |
Output is correct |
88 |
Correct |
13 ms |
4892 KB |
Output is correct |
89 |
Correct |
3 ms |
2820 KB |
Output is correct |
90 |
Correct |
3 ms |
2812 KB |
Output is correct |
91 |
Correct |
32 ms |
6904 KB |
Output is correct |
92 |
Correct |
33 ms |
6944 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
2644 KB |
Output is correct |
2 |
Correct |
2 ms |
2684 KB |
Output is correct |
3 |
Correct |
2 ms |
2680 KB |
Output is correct |
4 |
Correct |
2 ms |
2644 KB |
Output is correct |
5 |
Correct |
1 ms |
2676 KB |
Output is correct |
6 |
Correct |
2 ms |
2644 KB |
Output is correct |
7 |
Correct |
2 ms |
2644 KB |
Output is correct |
8 |
Correct |
2 ms |
2680 KB |
Output is correct |
9 |
Correct |
2 ms |
2644 KB |
Output is correct |
10 |
Correct |
2 ms |
2644 KB |
Output is correct |
11 |
Correct |
2 ms |
2680 KB |
Output is correct |
12 |
Correct |
2 ms |
2644 KB |
Output is correct |
13 |
Correct |
2 ms |
2676 KB |
Output is correct |
14 |
Correct |
2 ms |
2676 KB |
Output is correct |
15 |
Correct |
1 ms |
2644 KB |
Output is correct |
16 |
Correct |
2 ms |
2644 KB |
Output is correct |
17 |
Correct |
2 ms |
2644 KB |
Output is correct |
18 |
Correct |
2 ms |
2644 KB |
Output is correct |
19 |
Correct |
2 ms |
2644 KB |
Output is correct |
20 |
Correct |
2 ms |
2644 KB |
Output is correct |
21 |
Correct |
2 ms |
2644 KB |
Output is correct |
22 |
Correct |
2 ms |
2644 KB |
Output is correct |
23 |
Correct |
2 ms |
2644 KB |
Output is correct |
24 |
Correct |
2 ms |
2644 KB |
Output is correct |
25 |
Correct |
1 ms |
2680 KB |
Output is correct |
26 |
Correct |
2 ms |
2644 KB |
Output is correct |
27 |
Correct |
1 ms |
2644 KB |
Output is correct |
28 |
Correct |
2 ms |
2644 KB |
Output is correct |
29 |
Correct |
2 ms |
2644 KB |
Output is correct |
30 |
Correct |
2 ms |
2676 KB |
Output is correct |
31 |
Correct |
2 ms |
2640 KB |
Output is correct |
32 |
Correct |
2 ms |
2680 KB |
Output is correct |
33 |
Correct |
2 ms |
2676 KB |
Output is correct |
34 |
Correct |
2 ms |
2644 KB |
Output is correct |
35 |
Correct |
1 ms |
2644 KB |
Output is correct |
36 |
Correct |
2 ms |
2772 KB |
Output is correct |
37 |
Correct |
3 ms |
2808 KB |
Output is correct |
38 |
Correct |
10 ms |
2772 KB |
Output is correct |
39 |
Correct |
11 ms |
2772 KB |
Output is correct |
40 |
Correct |
11 ms |
2840 KB |
Output is correct |
41 |
Correct |
2 ms |
2772 KB |
Output is correct |
42 |
Correct |
3 ms |
2772 KB |
Output is correct |
43 |
Correct |
2 ms |
2772 KB |
Output is correct |
44 |
Correct |
2 ms |
2772 KB |
Output is correct |
45 |
Correct |
4 ms |
2772 KB |
Output is correct |
46 |
Correct |
3 ms |
2900 KB |
Output is correct |
47 |
Correct |
2 ms |
2644 KB |
Output is correct |
48 |
Correct |
3 ms |
2772 KB |
Output is correct |
49 |
Correct |
2 ms |
2804 KB |
Output is correct |
50 |
Correct |
2 ms |
2772 KB |
Output is correct |
51 |
Correct |
9 ms |
2836 KB |
Output is correct |
52 |
Correct |
8 ms |
2772 KB |
Output is correct |
53 |
Correct |
10 ms |
2804 KB |
Output is correct |
54 |
Correct |
10 ms |
2804 KB |
Output is correct |
55 |
Correct |
11 ms |
2808 KB |
Output is correct |
56 |
Correct |
9 ms |
2772 KB |
Output is correct |
57 |
Correct |
10 ms |
2804 KB |
Output is correct |
58 |
Correct |
8 ms |
2772 KB |
Output is correct |
59 |
Correct |
7 ms |
2812 KB |
Output is correct |
60 |
Correct |
5 ms |
2772 KB |
Output is correct |
61 |
Correct |
4 ms |
2804 KB |
Output is correct |
62 |
Correct |
3 ms |
2772 KB |
Output is correct |
63 |
Correct |
9 ms |
2772 KB |
Output is correct |
64 |
Correct |
7 ms |
2772 KB |
Output is correct |
65 |
Correct |
6 ms |
2772 KB |
Output is correct |
66 |
Correct |
61 ms |
16708 KB |
Output is correct |
67 |
Correct |
57 ms |
16608 KB |
Output is correct |
68 |
Correct |
57 ms |
12508 KB |
Output is correct |
69 |
Correct |
52 ms |
14576 KB |
Output is correct |
70 |
Correct |
57 ms |
11196 KB |
Output is correct |
71 |
Correct |
49 ms |
11260 KB |
Output is correct |
72 |
Correct |
55 ms |
10156 KB |
Output is correct |
73 |
Correct |
53 ms |
10724 KB |
Output is correct |
74 |
Correct |
47 ms |
9164 KB |
Output is correct |
75 |
Correct |
60 ms |
10060 KB |
Output is correct |
76 |
Correct |
39 ms |
8304 KB |
Output is correct |
77 |
Correct |
42 ms |
8140 KB |
Output is correct |
78 |
Correct |
39 ms |
8208 KB |
Output is correct |
79 |
Correct |
39 ms |
8084 KB |
Output is correct |
80 |
Correct |
25 ms |
7460 KB |
Output is correct |
81 |
Correct |
27 ms |
7436 KB |
Output is correct |
82 |
Correct |
3 ms |
4180 KB |
Output is correct |
83 |
Correct |
5 ms |
4216 KB |
Output is correct |
84 |
Correct |
4 ms |
4180 KB |
Output is correct |
85 |
Correct |
4 ms |
4180 KB |
Output is correct |
86 |
Correct |
3 ms |
4180 KB |
Output is correct |
87 |
Correct |
3 ms |
4052 KB |
Output is correct |
88 |
Correct |
28 ms |
6988 KB |
Output is correct |
89 |
Correct |
28 ms |
6900 KB |
Output is correct |
90 |
Correct |
27 ms |
6984 KB |
Output is correct |
91 |
Correct |
35 ms |
7180 KB |
Output is correct |
92 |
Correct |
31 ms |
6976 KB |
Output is correct |
93 |
Correct |
29 ms |
6956 KB |
Output is correct |
94 |
Correct |
33 ms |
6952 KB |
Output is correct |
95 |
Correct |
29 ms |
6972 KB |
Output is correct |
96 |
Correct |
28 ms |
6984 KB |
Output is correct |
97 |
Correct |
21 ms |
6904 KB |
Output is correct |
98 |
Correct |
20 ms |
7000 KB |
Output is correct |
99 |
Correct |
12 ms |
4944 KB |
Output is correct |
100 |
Correct |
7 ms |
3924 KB |
Output is correct |
101 |
Correct |
3 ms |
2900 KB |
Output is correct |
102 |
Correct |
2 ms |
2804 KB |
Output is correct |
103 |
Correct |
2 ms |
2724 KB |
Output is correct |
104 |
Correct |
20 ms |
7000 KB |
Output is correct |
105 |
Correct |
19 ms |
6980 KB |
Output is correct |
106 |
Correct |
18 ms |
6896 KB |
Output is correct |
107 |
Correct |
18 ms |
6980 KB |
Output is correct |
108 |
Correct |
52 ms |
9160 KB |
Output is correct |
109 |
Correct |
46 ms |
9116 KB |
Output is correct |
110 |
Correct |
45 ms |
9012 KB |
Output is correct |
111 |
Correct |
46 ms |
9080 KB |
Output is correct |
112 |
Correct |
48 ms |
9104 KB |
Output is correct |
113 |
Correct |
59 ms |
13184 KB |
Output is correct |
114 |
Correct |
57 ms |
11676 KB |
Output is correct |
115 |
Correct |
58 ms |
10976 KB |
Output is correct |
116 |
Correct |
46 ms |
10376 KB |
Output is correct |
117 |
Correct |
54 ms |
8848 KB |
Output is correct |
118 |
Correct |
49 ms |
9052 KB |
Output is correct |
119 |
Correct |
45 ms |
8612 KB |
Output is correct |
120 |
Correct |
52 ms |
8688 KB |
Output is correct |
121 |
Correct |
39 ms |
8368 KB |
Output is correct |
122 |
Correct |
36 ms |
8184 KB |
Output is correct |
123 |
Correct |
21 ms |
7276 KB |
Output is correct |
124 |
Correct |
34 ms |
9520 KB |
Output is correct |
125 |
Correct |
33 ms |
9388 KB |
Output is correct |
126 |
Correct |
34 ms |
9412 KB |
Output is correct |
127 |
Correct |
35 ms |
9340 KB |
Output is correct |
128 |
Correct |
26 ms |
6988 KB |
Output is correct |
129 |
Correct |
26 ms |
6896 KB |
Output is correct |
130 |
Correct |
31 ms |
6984 KB |
Output is correct |
131 |
Correct |
30 ms |
6900 KB |
Output is correct |
132 |
Correct |
30 ms |
6896 KB |
Output is correct |
133 |
Correct |
32 ms |
6932 KB |
Output is correct |
134 |
Correct |
30 ms |
6876 KB |
Output is correct |
135 |
Correct |
30 ms |
6900 KB |
Output is correct |
136 |
Correct |
33 ms |
6932 KB |
Output is correct |
137 |
Correct |
36 ms |
7036 KB |
Output is correct |
138 |
Correct |
31 ms |
6944 KB |
Output is correct |
139 |
Correct |
31 ms |
7020 KB |
Output is correct |
140 |
Correct |
32 ms |
6984 KB |
Output is correct |
141 |
Correct |
32 ms |
7000 KB |
Output is correct |
142 |
Correct |
32 ms |
6976 KB |
Output is correct |
143 |
Correct |
24 ms |
6904 KB |
Output is correct |
144 |
Correct |
20 ms |
6976 KB |
Output is correct |
145 |
Correct |
9 ms |
3920 KB |
Output is correct |
146 |
Correct |
4 ms |
2772 KB |
Output is correct |
147 |
Correct |
2 ms |
2772 KB |
Output is correct |
148 |
Correct |
30 ms |
6936 KB |
Output is correct |
149 |
Correct |
30 ms |
6980 KB |
Output is correct |
150 |
Correct |
28 ms |
6892 KB |
Output is correct |
151 |
Correct |
28 ms |
6896 KB |
Output is correct |
152 |
Correct |
2 ms |
2676 KB |
Output is correct |
153 |
Correct |
2 ms |
2644 KB |
Output is correct |
154 |
Correct |
2 ms |
2676 KB |
Output is correct |
155 |
Correct |
55 ms |
9092 KB |
Output is correct |
156 |
Correct |
47 ms |
9036 KB |
Output is correct |
157 |
Incorrect |
69 ms |
9036 KB |
Output isn't correct |
158 |
Halted |
0 ms |
0 KB |
- |