Submission #381212

# Submission time Handle Problem Language Result Execution time Memory
381212 2021-03-24T18:49:04 Z rainboy Duathlon (APIO18_duathlon) C
100 / 100
188 ms 32492 KB
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define N	100000
#define M	200000

int min(int a, int b) { return a < b ? a : b; }

int ds[M];

int find(int i) {
	return ds[i] < 0 ? i : (ds[i] = find(ds[i]));
}

void join(int i, int j) {
	i = find(i);
	j = find(j);
	if (i == j)
		return;
	if (ds[i] > ds[j])
		ds[i] = j;
	else {
		if (ds[i] == ds[j])
			ds[i]--;
		ds[j] = i;
	}
}

int ij[M];
int *eh[N], eo[N], *ej[M + N], eo_[M + N];

void append(int **ej, int *eo, int i, int j) {
	int o = eo[i]++;

	if (o >= 2 && (o & o - 1) == 0)
		ej[i] = (int *) realloc(ej[i], o * 2 * sizeof *ej[i]);
	ej[i][o] = j;
}

int ta[N], tb[N];

void dfs1(int f, int i) {
	static int time;
	int o;

	ta[i] = tb[i] = ++time;
	for (o = eo[i]; o--; ) {
		int h = eh[i][o], j = i ^ ij[h];

		if (h != f) {
			if (!ta[j]) {
				dfs1(h, j);
				if (tb[j] < ta[i])
					join(h, f);
				tb[i] = min(tb[i], tb[j]);
			} else if (ta[j] < ta[i]) {
				tb[i] = min(tb[i], ta[j]);
				join(h, f);
			}
		}
	}
}

char visited[M + N]; int pp[M + N], sz[M + N], qu[M + N], cnt;
long long ans;

void dfs2(int p, int i) {
	int o;

	qu[cnt++] = i;
	visited[i] = 1, pp[i] = p;
	for (o = eo_[i]; o--; ) {
		int j = ej[i][o];

		if (j != p) {
			dfs2(i, j);
			sz[i] += sz[j];
		}
	}
}

int main() {
	static char used[M];
	int n, m, h, i, i_, j;

	scanf("%d%d", &n, &m);
	for (i = 0; i < n; i++)
		eh[i] = (int *) malloc(2 * sizeof *eh[i]);
	for (h = 0; h < m; h++) {
		scanf("%d%d", &i, &j), i--, j--;
		ij[h] = i ^ j;
		append(eh, eo, i, h), append(eh, eo, j, h);
	}
	memset(ds, -1, m * sizeof *ds);
	for (i = 0; i < n; i++)
		if (!ta[i])
			dfs1(-1, i);
	for (i = 0; i < m + n; i++)
		ej[i] = (int *) malloc(2 * sizeof *ej[i]);
	for (i = 0; i < n; i++) {
		int o, h_;

		h_ = -1;
		for (o = eo[i]; o--; ) {
			h = find(eh[i][o]);
			if (!used[h]) {
				used[h] = 1;
				append(ej, eo_, m + i, h), append(ej, eo_, h, m + i);
				if (h_ == -1)
					h_ = h;
				else
					h_ = -2;
			}
		}
		for (o = eo[i]; o--; ) {
			h = find(eh[i][o]);
			used[h] = 0;
		}
		sz[m + i] = 1;
	}
	for (i_ = 0; i_ < m + n; i_++)
		if (!visited[i_]) {
			int n_;

			cnt = 0, dfs2(-1, i_);
			n_ = sz[i_];
			ans += (long long) n_ * (n_ - 1) * (n_ - 2);
			while (cnt--) {
				int o;

				i = qu[cnt];
				if (i < m)
					for (o = eo_[i]; o--; ) {
						int s;

						j = ej[i][o], s = j == pp[i] ? n_ - sz[i] : sz[j];
						ans -= (long long) (eo_[i] - 1) * s * (s - 1);
					}
			}
		}
	printf("%lld\n", ans);
	return 0;
}

Compilation message

count_triplets.c: In function 'append':
count_triplets.c:36:23: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   36 |  if (o >= 2 && (o & o - 1) == 0)
      |                     ~~^~~
count_triplets.c: In function 'main':
count_triplets.c:87:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   87 |  scanf("%d%d", &n, &m);
      |  ^~~~~~~~~~~~~~~~~~~~~
count_triplets.c:91:3: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   91 |   scanf("%d%d", &i, &j), i--, j--;
      |   ^~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 492 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 2 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 492 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 2 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 1 ms 364 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 1 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 384 KB Output is correct
57 Correct 1 ms 364 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 1 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 85 ms 26092 KB Output is correct
2 Correct 84 ms 26092 KB Output is correct
3 Correct 111 ms 22380 KB Output is correct
4 Correct 108 ms 24428 KB Output is correct
5 Correct 116 ms 20988 KB Output is correct
6 Correct 114 ms 23660 KB Output is correct
7 Correct 110 ms 19820 KB Output is correct
8 Correct 117 ms 20332 KB Output is correct
9 Correct 107 ms 18540 KB Output is correct
10 Correct 116 ms 19052 KB Output is correct
11 Correct 85 ms 16108 KB Output is correct
12 Correct 82 ms 15852 KB Output is correct
13 Correct 77 ms 15468 KB Output is correct
14 Correct 74 ms 15340 KB Output is correct
15 Correct 57 ms 14060 KB Output is correct
16 Correct 56 ms 14060 KB Output is correct
17 Correct 13 ms 10604 KB Output is correct
18 Correct 13 ms 10604 KB Output is correct
19 Correct 13 ms 10604 KB Output is correct
20 Correct 13 ms 10604 KB Output is correct
21 Correct 13 ms 10476 KB Output is correct
22 Correct 12 ms 10476 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 492 KB Output is correct
2 Correct 2 ms 492 KB Output is correct
3 Correct 1 ms 492 KB Output is correct
4 Correct 1 ms 620 KB Output is correct
5 Correct 2 ms 620 KB Output is correct
6 Correct 2 ms 620 KB Output is correct
7 Correct 2 ms 748 KB Output is correct
8 Correct 2 ms 620 KB Output is correct
9 Correct 1 ms 620 KB Output is correct
10 Correct 2 ms 572 KB Output is correct
11 Correct 1 ms 492 KB Output is correct
12 Correct 2 ms 492 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 492 KB Output is correct
15 Correct 2 ms 492 KB Output is correct
16 Correct 1 ms 492 KB Output is correct
17 Correct 2 ms 512 KB Output is correct
18 Correct 1 ms 492 KB Output is correct
19 Correct 1 ms 492 KB Output is correct
20 Correct 1 ms 492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 139 ms 18028 KB Output is correct
2 Correct 153 ms 17900 KB Output is correct
3 Correct 127 ms 17900 KB Output is correct
4 Correct 130 ms 17892 KB Output is correct
5 Correct 135 ms 17900 KB Output is correct
6 Correct 140 ms 32236 KB Output is correct
7 Correct 142 ms 27372 KB Output is correct
8 Correct 146 ms 24832 KB Output is correct
9 Correct 144 ms 22380 KB Output is correct
10 Correct 127 ms 17516 KB Output is correct
11 Correct 127 ms 17772 KB Output is correct
12 Correct 137 ms 17388 KB Output is correct
13 Correct 121 ms 17260 KB Output is correct
14 Correct 105 ms 16236 KB Output is correct
15 Correct 90 ms 15596 KB Output is correct
16 Correct 63 ms 13676 KB Output is correct
17 Correct 80 ms 18284 KB Output is correct
18 Correct 85 ms 18264 KB Output is correct
19 Correct 89 ms 18508 KB Output is correct
20 Correct 99 ms 18412 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 492 KB Output is correct
2 Correct 2 ms 492 KB Output is correct
3 Correct 2 ms 492 KB Output is correct
4 Correct 2 ms 620 KB Output is correct
5 Correct 2 ms 620 KB Output is correct
6 Correct 2 ms 620 KB Output is correct
7 Correct 2 ms 620 KB Output is correct
8 Correct 2 ms 620 KB Output is correct
9 Correct 2 ms 620 KB Output is correct
10 Correct 1 ms 620 KB Output is correct
11 Correct 2 ms 620 KB Output is correct
12 Correct 2 ms 620 KB Output is correct
13 Correct 2 ms 620 KB Output is correct
14 Correct 2 ms 620 KB Output is correct
15 Correct 2 ms 620 KB Output is correct
16 Correct 2 ms 620 KB Output is correct
17 Correct 2 ms 620 KB Output is correct
18 Correct 2 ms 620 KB Output is correct
19 Correct 2 ms 492 KB Output is correct
20 Correct 2 ms 492 KB Output is correct
21 Correct 2 ms 620 KB Output is correct
22 Correct 2 ms 620 KB Output is correct
23 Correct 2 ms 620 KB Output is correct
24 Correct 2 ms 620 KB Output is correct
25 Correct 1 ms 492 KB Output is correct
26 Correct 1 ms 512 KB Output is correct
27 Correct 1 ms 492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 143 ms 17900 KB Output is correct
2 Correct 129 ms 17772 KB Output is correct
3 Correct 146 ms 18540 KB Output is correct
4 Correct 150 ms 20460 KB Output is correct
5 Correct 119 ms 20204 KB Output is correct
6 Correct 104 ms 19948 KB Output is correct
7 Correct 109 ms 19820 KB Output is correct
8 Correct 105 ms 19564 KB Output is correct
9 Correct 107 ms 19436 KB Output is correct
10 Correct 98 ms 19308 KB Output is correct
11 Correct 92 ms 19308 KB Output is correct
12 Correct 100 ms 19308 KB Output is correct
13 Correct 85 ms 19308 KB Output is correct
14 Correct 89 ms 20476 KB Output is correct
15 Correct 143 ms 25836 KB Output is correct
16 Correct 151 ms 23916 KB Output is correct
17 Correct 146 ms 26092 KB Output is correct
18 Correct 147 ms 24300 KB Output is correct
19 Correct 136 ms 20332 KB Output is correct
20 Correct 134 ms 20092 KB Output is correct
21 Correct 139 ms 20092 KB Output is correct
22 Correct 114 ms 19052 KB Output is correct
23 Correct 99 ms 18284 KB Output is correct
24 Correct 124 ms 20536 KB Output is correct
25 Correct 124 ms 20588 KB Output is correct
26 Correct 127 ms 20460 KB Output is correct
27 Correct 119 ms 20460 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 492 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 2 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 1 ms 364 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 1 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 384 KB Output is correct
57 Correct 1 ms 364 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 1 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 1 ms 492 KB Output is correct
67 Correct 1 ms 492 KB Output is correct
68 Correct 1 ms 620 KB Output is correct
69 Correct 2 ms 620 KB Output is correct
70 Correct 2 ms 620 KB Output is correct
71 Correct 2 ms 492 KB Output is correct
72 Correct 2 ms 492 KB Output is correct
73 Correct 1 ms 492 KB Output is correct
74 Correct 2 ms 492 KB Output is correct
75 Correct 2 ms 620 KB Output is correct
76 Correct 1 ms 364 KB Output is correct
77 Correct 2 ms 620 KB Output is correct
78 Correct 2 ms 620 KB Output is correct
79 Correct 2 ms 620 KB Output is correct
80 Correct 2 ms 620 KB Output is correct
81 Correct 2 ms 620 KB Output is correct
82 Correct 1 ms 620 KB Output is correct
83 Correct 2 ms 620 KB Output is correct
84 Correct 2 ms 620 KB Output is correct
85 Correct 2 ms 620 KB Output is correct
86 Correct 2 ms 620 KB Output is correct
87 Correct 2 ms 620 KB Output is correct
88 Correct 2 ms 748 KB Output is correct
89 Correct 2 ms 640 KB Output is correct
90 Correct 2 ms 492 KB Output is correct
91 Correct 2 ms 620 KB Output is correct
92 Correct 2 ms 620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 364 KB Output is correct
13 Correct 1 ms 364 KB Output is correct
14 Correct 1 ms 364 KB Output is correct
15 Correct 1 ms 492 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 2 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 1 ms 364 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 2 ms 492 KB Output is correct
35 Correct 1 ms 364 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 1 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 384 KB Output is correct
57 Correct 1 ms 364 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 1 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 85 ms 26092 KB Output is correct
67 Correct 84 ms 26092 KB Output is correct
68 Correct 111 ms 22380 KB Output is correct
69 Correct 108 ms 24428 KB Output is correct
70 Correct 116 ms 20988 KB Output is correct
71 Correct 114 ms 23660 KB Output is correct
72 Correct 110 ms 19820 KB Output is correct
73 Correct 117 ms 20332 KB Output is correct
74 Correct 107 ms 18540 KB Output is correct
75 Correct 116 ms 19052 KB Output is correct
76 Correct 85 ms 16108 KB Output is correct
77 Correct 82 ms 15852 KB Output is correct
78 Correct 77 ms 15468 KB Output is correct
79 Correct 74 ms 15340 KB Output is correct
80 Correct 57 ms 14060 KB Output is correct
81 Correct 56 ms 14060 KB Output is correct
82 Correct 13 ms 10604 KB Output is correct
83 Correct 13 ms 10604 KB Output is correct
84 Correct 13 ms 10604 KB Output is correct
85 Correct 13 ms 10604 KB Output is correct
86 Correct 13 ms 10476 KB Output is correct
87 Correct 12 ms 10476 KB Output is correct
88 Correct 1 ms 492 KB Output is correct
89 Correct 2 ms 492 KB Output is correct
90 Correct 1 ms 492 KB Output is correct
91 Correct 1 ms 620 KB Output is correct
92 Correct 2 ms 620 KB Output is correct
93 Correct 2 ms 620 KB Output is correct
94 Correct 2 ms 748 KB Output is correct
95 Correct 2 ms 620 KB Output is correct
96 Correct 1 ms 620 KB Output is correct
97 Correct 2 ms 572 KB Output is correct
98 Correct 1 ms 492 KB Output is correct
99 Correct 2 ms 492 KB Output is correct
100 Correct 2 ms 492 KB Output is correct
101 Correct 2 ms 492 KB Output is correct
102 Correct 2 ms 492 KB Output is correct
103 Correct 1 ms 492 KB Output is correct
104 Correct 2 ms 512 KB Output is correct
105 Correct 1 ms 492 KB Output is correct
106 Correct 1 ms 492 KB Output is correct
107 Correct 1 ms 492 KB Output is correct
108 Correct 139 ms 18028 KB Output is correct
109 Correct 153 ms 17900 KB Output is correct
110 Correct 127 ms 17900 KB Output is correct
111 Correct 130 ms 17892 KB Output is correct
112 Correct 135 ms 17900 KB Output is correct
113 Correct 140 ms 32236 KB Output is correct
114 Correct 142 ms 27372 KB Output is correct
115 Correct 146 ms 24832 KB Output is correct
116 Correct 144 ms 22380 KB Output is correct
117 Correct 127 ms 17516 KB Output is correct
118 Correct 127 ms 17772 KB Output is correct
119 Correct 137 ms 17388 KB Output is correct
120 Correct 121 ms 17260 KB Output is correct
121 Correct 105 ms 16236 KB Output is correct
122 Correct 90 ms 15596 KB Output is correct
123 Correct 63 ms 13676 KB Output is correct
124 Correct 80 ms 18284 KB Output is correct
125 Correct 85 ms 18264 KB Output is correct
126 Correct 89 ms 18508 KB Output is correct
127 Correct 99 ms 18412 KB Output is correct
128 Correct 1 ms 492 KB Output is correct
129 Correct 2 ms 492 KB Output is correct
130 Correct 2 ms 492 KB Output is correct
131 Correct 2 ms 620 KB Output is correct
132 Correct 2 ms 620 KB Output is correct
133 Correct 2 ms 620 KB Output is correct
134 Correct 2 ms 620 KB Output is correct
135 Correct 2 ms 620 KB Output is correct
136 Correct 2 ms 620 KB Output is correct
137 Correct 1 ms 620 KB Output is correct
138 Correct 2 ms 620 KB Output is correct
139 Correct 2 ms 620 KB Output is correct
140 Correct 2 ms 620 KB Output is correct
141 Correct 2 ms 620 KB Output is correct
142 Correct 2 ms 620 KB Output is correct
143 Correct 2 ms 620 KB Output is correct
144 Correct 2 ms 620 KB Output is correct
145 Correct 2 ms 620 KB Output is correct
146 Correct 2 ms 492 KB Output is correct
147 Correct 2 ms 492 KB Output is correct
148 Correct 2 ms 620 KB Output is correct
149 Correct 2 ms 620 KB Output is correct
150 Correct 2 ms 620 KB Output is correct
151 Correct 2 ms 620 KB Output is correct
152 Correct 1 ms 492 KB Output is correct
153 Correct 1 ms 512 KB Output is correct
154 Correct 1 ms 492 KB Output is correct
155 Correct 143 ms 17900 KB Output is correct
156 Correct 129 ms 17772 KB Output is correct
157 Correct 146 ms 18540 KB Output is correct
158 Correct 150 ms 20460 KB Output is correct
159 Correct 119 ms 20204 KB Output is correct
160 Correct 104 ms 19948 KB Output is correct
161 Correct 109 ms 19820 KB Output is correct
162 Correct 105 ms 19564 KB Output is correct
163 Correct 107 ms 19436 KB Output is correct
164 Correct 98 ms 19308 KB Output is correct
165 Correct 92 ms 19308 KB Output is correct
166 Correct 100 ms 19308 KB Output is correct
167 Correct 85 ms 19308 KB Output is correct
168 Correct 89 ms 20476 KB Output is correct
169 Correct 143 ms 25836 KB Output is correct
170 Correct 151 ms 23916 KB Output is correct
171 Correct 146 ms 26092 KB Output is correct
172 Correct 147 ms 24300 KB Output is correct
173 Correct 136 ms 20332 KB Output is correct
174 Correct 134 ms 20092 KB Output is correct
175 Correct 139 ms 20092 KB Output is correct
176 Correct 114 ms 19052 KB Output is correct
177 Correct 99 ms 18284 KB Output is correct
178 Correct 124 ms 20536 KB Output is correct
179 Correct 124 ms 20588 KB Output is correct
180 Correct 127 ms 20460 KB Output is correct
181 Correct 119 ms 20460 KB Output is correct
182 Correct 1 ms 492 KB Output is correct
183 Correct 1 ms 492 KB Output is correct
184 Correct 1 ms 620 KB Output is correct
185 Correct 2 ms 620 KB Output is correct
186 Correct 2 ms 620 KB Output is correct
187 Correct 2 ms 492 KB Output is correct
188 Correct 2 ms 492 KB Output is correct
189 Correct 1 ms 492 KB Output is correct
190 Correct 2 ms 492 KB Output is correct
191 Correct 2 ms 620 KB Output is correct
192 Correct 1 ms 364 KB Output is correct
193 Correct 2 ms 620 KB Output is correct
194 Correct 2 ms 620 KB Output is correct
195 Correct 2 ms 620 KB Output is correct
196 Correct 2 ms 620 KB Output is correct
197 Correct 2 ms 620 KB Output is correct
198 Correct 1 ms 620 KB Output is correct
199 Correct 2 ms 620 KB Output is correct
200 Correct 2 ms 620 KB Output is correct
201 Correct 2 ms 620 KB Output is correct
202 Correct 2 ms 620 KB Output is correct
203 Correct 2 ms 620 KB Output is correct
204 Correct 2 ms 748 KB Output is correct
205 Correct 2 ms 640 KB Output is correct
206 Correct 2 ms 492 KB Output is correct
207 Correct 2 ms 620 KB Output is correct
208 Correct 2 ms 620 KB Output is correct
209 Correct 12 ms 9836 KB Output is correct
210 Correct 61 ms 14444 KB Output is correct
211 Correct 112 ms 21356 KB Output is correct
212 Correct 141 ms 27116 KB Output is correct
213 Correct 188 ms 32492 KB Output is correct
214 Correct 67 ms 19564 KB Output is correct
215 Correct 69 ms 20428 KB Output is correct
216 Correct 156 ms 21740 KB Output is correct
217 Correct 139 ms 21484 KB Output is correct
218 Correct 107 ms 20112 KB Output is correct
219 Correct 100 ms 19692 KB Output is correct
220 Correct 94 ms 19436 KB Output is correct
221 Correct 83 ms 19180 KB Output is correct
222 Correct 89 ms 21100 KB Output is correct
223 Correct 149 ms 24556 KB Output is correct
224 Correct 146 ms 23660 KB Output is correct
225 Correct 136 ms 21484 KB Output is correct
226 Correct 136 ms 21356 KB Output is correct
227 Correct 130 ms 21376 KB Output is correct
228 Correct 118 ms 19948 KB Output is correct
229 Correct 97 ms 18796 KB Output is correct
230 Correct 135 ms 21868 KB Output is correct
231 Correct 130 ms 21996 KB Output is correct