Submission #848843

# Submission time Handle Problem Language Result Execution time Memory
848843 2023-09-13T15:42:25 Z rainboy Beech Tree (IOI23_beechtree) C++17
71 / 100
57 ms 18516 KB
#include "beechtree.h"
#include <cstdlib>

using namespace std;

typedef vector<int> vi;

const int N = 200000, M = 200000;

int max(int a, int b) { return a > b ? a : b; }

unsigned int X = 12345;

int rand_() {
	return (X *= 3) >> 1;
}

int pp[N], cc[N];

int *ej[N], eo[N];

void append(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;
}

char used[M];

int duplicate(int i) {
	int dup = 0;
	for (int o = eo[i]; o--; ) {
		int j = ej[i][o];
		if (used[cc[j]])
			dup = 1;
		used[cc[j]] = 1;
	}
	for (int o = eo[i]; o--; ) {
		int j = ej[i][o];
		used[cc[j]] = 0;
	}
	return dup;
}

int contains(int i1, int i2) {
	for (int o = eo[i1]; o--; ) {
		int j = ej[i1][o];
		used[cc[j]] = 1;
	}
	int cont = 1;
	for (int o = eo[i2]; o--; ) {
		int j = ej[i2][o];
		if (!used[cc[j]])
			cont = 0;
	}
	for (int o = eo[i1]; o--; ) {
		int j = ej[i1][o];
		used[cc[j]] = 0;
	}
	return cont;
}

int sz[N], xx[N], qu[N], ta[N], tb[N];

void dfs(int i) {
	static int time;
	sz[i] = 1, qu[ta[i] = time++] = i;
	for (int o = eo[i]; o--; ) {
		int j = ej[i][o];
		dfs(j);
		sz[i] += sz[j];
	}
	tb[i] = time;
}

int compare_sz(int i, int j) {
	int c = ta[i] - ta[j];
	while (i != -1 && j != -1) {
		if (sz[i] != sz[j])
			return sz[j] - sz[i];
		i = pp[i], j = pp[j];
	}
	return c;
}

int compare_x(int i, int j) {
	return xx[i] - xx[j];
}

int compare_eo(int i, int j) { return eo[i] - eo[j]; }

int (*compare)(int, int);

void sort(int *ii, int l, int r) {
	while (l < r) {
		int i = l, j = l, k = r, i_ = ii[l + rand_() % (r - l)], tmp;
		while (j < k) {
			int c = compare(ii[j], i_);
			if (c == 0)
				j++;
			else if (c < 0) {
				tmp = ii[i], ii[i] = ii[j], ii[j] = tmp;
				i++, j++;
			} else {
				k--;
				tmp = ii[j], ii[j] = ii[k], ii[k] = tmp;
			}
		}
		sort(ii, l, i);
		l = k;
	}
}

int ii[N], kk[M];
int hh[N];

vi beechtree(int n, int m, vi pp_, vi cc_) {
	for (int i = 0; i < n; i++)
		pp[i] = pp_[i], cc[i] = cc_[i] - 1;
	for (int i = 0; i < n; i++)
		ej[i] = (int *) malloc(2 * sizeof *ej[i]);
	for (int i = 1; i < n; i++)
		append(pp[i], i);
	int line = 1;
	for (int i = 1; i < n; i++)
		if (pp[i] != i - 1) {
			line = 0;
			break;
		}
	vi ans(n, 0);
	if (line) {
		ans[n - 1] = 1;
		for (int i = n - 2; i >= 0 && cc[i + 1] == cc[n - 1]; i--)
			ans[i] = 1;
	} else if (n <= 2000) {
		dfs(0);
		for (int i = 0; i < n; i++)
			ii[i] = i;
		compare = compare_sz, sort(ii, 0, n);
		for (int i = 0; i < n; i++)
			xx[ii[i]] = i;
		for (int i = 0; i < n; i++) {
			for (int h = ta[i]; h < tb[i]; h++)
				ii[h - ta[i]] = qu[h];
			compare = compare_x, sort(ii, 0, tb[i] - ta[i]);
			ans[i] = 1;
			for (int h = 1; h < tb[i] - ta[i]; h++) {
				int j = ii[h];
				if (ii[kk[cc[j]]++] != pp[j]) {
					ans[i] = 0;
					break;
				}
			}
			for (int h = 1; h < tb[i] - ta[i]; h++) {
				int j = ii[h];
				kk[cc[j]] = 0;
			}
		}
	} else
		for (int i = n - 1; i >= 0; i--) {
			hh[i] = 0;
			for (int o = 0; o < eo[i]; o++)
				hh[i] = max(hh[i], hh[ej[i][o]] + 1);
			if (hh[i] > 2) {
				ans[i] = 0;
				continue;
			}
			compare = compare_eo, sort(ej[i], 0, eo[i]);
			ans[i] = !duplicate(i);
			for (int o = 0; o < eo[i]; o++)
				if (duplicate(ej[i][o])) {
					ans[i] = 0;
					break;
				}
			for (int o = 0; o < eo[i]; o++)
				if (!contains(o + 1 == eo[i] ? i : ej[i][o + 1], ej[i][o])) {
					ans[i] = 0;
					break;
				}
		}
	return ans;
}

Compilation message

beechtree.cpp: In function 'void append(int, int)':
beechtree.cpp:24:23: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   24 |  if (o >= 2 && (o & o - 1) == 0)
      |                     ~~^~~
# Verdict Execution time Memory Grader output
1 Correct 2 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6488 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 2396 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2392 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6492 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6588 KB Output is correct
30 Correct 1 ms 6488 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6492 KB Output is correct
33 Correct 1 ms 6492 KB Output is correct
34 Correct 1 ms 6488 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 2396 KB Output is correct
3 Correct 0 ms 2396 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2392 KB Output is correct
7 Correct 54 ms 14676 KB Output is correct
8 Correct 55 ms 14420 KB Output is correct
9 Correct 1 ms 2392 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 1 ms 2396 KB Output is correct
13 Correct 1 ms 2396 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2396 KB Output is correct
17 Correct 47 ms 14284 KB Output is correct
18 Correct 49 ms 14428 KB Output is correct
19 Correct 50 ms 14424 KB Output is correct
20 Correct 54 ms 14420 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 1 ms 6492 KB Output is correct
6 Correct 1 ms 6492 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6488 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 2 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 28 ms 11348 KB Output is correct
16 Correct 27 ms 11096 KB Output is correct
17 Correct 27 ms 11100 KB Output is correct
18 Correct 28 ms 11096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 2396 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 54 ms 14676 KB Output is correct
6 Correct 55 ms 14420 KB Output is correct
7 Correct 1 ms 6488 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 15 ms 6748 KB Output is correct
10 Correct 3 ms 6748 KB Output is correct
11 Correct 57 ms 18516 KB Output is correct
12 Correct 53 ms 16716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6488 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 0 ms 2396 KB Output is correct
6 Correct 0 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2392 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6492 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6588 KB Output is correct
33 Correct 1 ms 6488 KB Output is correct
34 Correct 1 ms 6492 KB Output is correct
35 Correct 1 ms 6492 KB Output is correct
36 Correct 1 ms 6492 KB Output is correct
37 Correct 1 ms 6488 KB Output is correct
38 Correct 1 ms 2392 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 1 ms 2396 KB Output is correct
42 Correct 1 ms 6492 KB Output is correct
43 Correct 1 ms 6492 KB Output is correct
44 Correct 1 ms 6492 KB Output is correct
45 Correct 1 ms 6492 KB Output is correct
46 Correct 1 ms 6492 KB Output is correct
47 Correct 1 ms 6492 KB Output is correct
48 Correct 1 ms 6492 KB Output is correct
49 Correct 1 ms 6492 KB Output is correct
50 Correct 1 ms 6492 KB Output is correct
51 Correct 1 ms 6488 KB Output is correct
52 Correct 1 ms 6488 KB Output is correct
53 Correct 1 ms 6492 KB Output is correct
54 Correct 1 ms 6488 KB Output is correct
55 Correct 1 ms 6744 KB Output is correct
56 Correct 1 ms 6492 KB Output is correct
57 Correct 1 ms 6492 KB Output is correct
58 Correct 1 ms 6492 KB Output is correct
59 Correct 1 ms 6492 KB Output is correct
60 Correct 1 ms 6492 KB Output is correct
61 Correct 1 ms 6492 KB Output is correct
62 Correct 1 ms 6492 KB Output is correct
63 Correct 1 ms 6608 KB Output is correct
64 Correct 1 ms 6492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 2396 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 1 ms 6492 KB Output is correct
6 Correct 1 ms 6492 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 2 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 12 ms 6492 KB Output is correct
31 Correct 3 ms 6492 KB Output is correct
32 Correct 4 ms 6492 KB Output is correct
33 Correct 6 ms 6728 KB Output is correct
34 Correct 3 ms 6488 KB Output is correct
35 Correct 3 ms 6492 KB Output is correct
36 Correct 3 ms 6492 KB Output is correct
37 Correct 38 ms 6488 KB Output is correct
38 Correct 18 ms 6492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6488 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 0 ms 2396 KB Output is correct
6 Correct 0 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2392 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6492 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6588 KB Output is correct
33 Correct 1 ms 6488 KB Output is correct
34 Correct 1 ms 6492 KB Output is correct
35 Correct 1 ms 6492 KB Output is correct
36 Correct 1 ms 6492 KB Output is correct
37 Correct 1 ms 6488 KB Output is correct
38 Correct 1 ms 2392 KB Output is correct
39 Correct 1 ms 2396 KB Output is correct
40 Correct 1 ms 2396 KB Output is correct
41 Correct 1 ms 2396 KB Output is correct
42 Correct 1 ms 2396 KB Output is correct
43 Correct 1 ms 2396 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
46 Correct 1 ms 6492 KB Output is correct
47 Correct 1 ms 6492 KB Output is correct
48 Correct 1 ms 6492 KB Output is correct
49 Correct 1 ms 6492 KB Output is correct
50 Correct 1 ms 6492 KB Output is correct
51 Correct 1 ms 6492 KB Output is correct
52 Correct 1 ms 6492 KB Output is correct
53 Correct 1 ms 6492 KB Output is correct
54 Correct 1 ms 6492 KB Output is correct
55 Correct 1 ms 6488 KB Output is correct
56 Correct 1 ms 6492 KB Output is correct
57 Correct 1 ms 6492 KB Output is correct
58 Correct 2 ms 6492 KB Output is correct
59 Correct 1 ms 6492 KB Output is correct
60 Correct 1 ms 6488 KB Output is correct
61 Correct 1 ms 6492 KB Output is correct
62 Correct 15 ms 6748 KB Output is correct
63 Correct 3 ms 6748 KB Output is correct
64 Correct 1 ms 6488 KB Output is correct
65 Correct 1 ms 6744 KB Output is correct
66 Correct 1 ms 6492 KB Output is correct
67 Correct 1 ms 6492 KB Output is correct
68 Correct 1 ms 6492 KB Output is correct
69 Correct 1 ms 6492 KB Output is correct
70 Correct 1 ms 6492 KB Output is correct
71 Correct 1 ms 6492 KB Output is correct
72 Correct 1 ms 6492 KB Output is correct
73 Correct 1 ms 6608 KB Output is correct
74 Correct 1 ms 6492 KB Output is correct
75 Correct 1 ms 2396 KB Output is correct
76 Correct 1 ms 2396 KB Output is correct
77 Correct 2 ms 2396 KB Output is correct
78 Correct 1 ms 2396 KB Output is correct
79 Correct 1 ms 2396 KB Output is correct
80 Correct 12 ms 6492 KB Output is correct
81 Correct 3 ms 6492 KB Output is correct
82 Correct 4 ms 6492 KB Output is correct
83 Correct 6 ms 6728 KB Output is correct
84 Correct 3 ms 6488 KB Output is correct
85 Correct 3 ms 6492 KB Output is correct
86 Correct 3 ms 6492 KB Output is correct
87 Correct 38 ms 6488 KB Output is correct
88 Correct 18 ms 6492 KB Output is correct
89 Correct 43 ms 6748 KB Output is correct
90 Correct 8 ms 6748 KB Output is correct
91 Correct 3 ms 6492 KB Output is correct
92 Correct 3 ms 6748 KB Output is correct
93 Correct 6 ms 6748 KB Output is correct
94 Correct 2 ms 6492 KB Output is correct
95 Correct 2 ms 6492 KB Output is correct
96 Correct 2 ms 6748 KB Output is correct
97 Correct 38 ms 6748 KB Output is correct
98 Correct 15 ms 6492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 2396 KB Output is correct
3 Correct 1 ms 6492 KB Output is correct
4 Correct 1 ms 6492 KB Output is correct
5 Correct 1 ms 6492 KB Output is correct
6 Correct 1 ms 6492 KB Output is correct
7 Correct 1 ms 6492 KB Output is correct
8 Correct 1 ms 6492 KB Output is correct
9 Correct 1 ms 6492 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 2 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 12 ms 6492 KB Output is correct
31 Correct 3 ms 6492 KB Output is correct
32 Correct 4 ms 6492 KB Output is correct
33 Correct 6 ms 6728 KB Output is correct
34 Correct 3 ms 6488 KB Output is correct
35 Correct 3 ms 6492 KB Output is correct
36 Correct 3 ms 6492 KB Output is correct
37 Correct 38 ms 6488 KB Output is correct
38 Correct 18 ms 6492 KB Output is correct
39 Correct 51 ms 14528 KB Output is correct
40 Correct 50 ms 14420 KB Output is correct
41 Correct 49 ms 14424 KB Output is correct
42 Correct 48 ms 14416 KB Output is correct
43 Incorrect 48 ms 17100 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
44 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 6492 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6488 KB Output is correct
4 Correct 1 ms 2396 KB Output is correct
5 Correct 0 ms 2396 KB Output is correct
6 Correct 0 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 1 ms 2396 KB Output is correct
9 Correct 1 ms 2392 KB Output is correct
10 Correct 1 ms 6492 KB Output is correct
11 Correct 1 ms 6492 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 6492 KB Output is correct
14 Correct 1 ms 6492 KB Output is correct
15 Correct 1 ms 6492 KB Output is correct
16 Correct 1 ms 6492 KB Output is correct
17 Correct 1 ms 6492 KB Output is correct
18 Correct 1 ms 6492 KB Output is correct
19 Correct 1 ms 6492 KB Output is correct
20 Correct 1 ms 6492 KB Output is correct
21 Correct 1 ms 6492 KB Output is correct
22 Correct 1 ms 6492 KB Output is correct
23 Correct 1 ms 6492 KB Output is correct
24 Correct 1 ms 6492 KB Output is correct
25 Correct 1 ms 6492 KB Output is correct
26 Correct 1 ms 6492 KB Output is correct
27 Correct 1 ms 6492 KB Output is correct
28 Correct 1 ms 6492 KB Output is correct
29 Correct 1 ms 6492 KB Output is correct
30 Correct 1 ms 6492 KB Output is correct
31 Correct 1 ms 6492 KB Output is correct
32 Correct 1 ms 6588 KB Output is correct
33 Correct 1 ms 6488 KB Output is correct
34 Correct 1 ms 6492 KB Output is correct
35 Correct 1 ms 6492 KB Output is correct
36 Correct 1 ms 6492 KB Output is correct
37 Correct 1 ms 6488 KB Output is correct
38 Correct 54 ms 14676 KB Output is correct
39 Correct 55 ms 14420 KB Output is correct
40 Correct 1 ms 2392 KB Output is correct
41 Correct 1 ms 2396 KB Output is correct
42 Correct 1 ms 2396 KB Output is correct
43 Correct 1 ms 2396 KB Output is correct
44 Correct 1 ms 2396 KB Output is correct
45 Correct 1 ms 2396 KB Output is correct
46 Correct 1 ms 2396 KB Output is correct
47 Correct 1 ms 2396 KB Output is correct
48 Correct 47 ms 14284 KB Output is correct
49 Correct 49 ms 14428 KB Output is correct
50 Correct 50 ms 14424 KB Output is correct
51 Correct 54 ms 14420 KB Output is correct
52 Correct 1 ms 6492 KB Output is correct
53 Correct 1 ms 6492 KB Output is correct
54 Correct 1 ms 6492 KB Output is correct
55 Correct 1 ms 6492 KB Output is correct
56 Correct 1 ms 6492 KB Output is correct
57 Correct 1 ms 6492 KB Output is correct
58 Correct 1 ms 6492 KB Output is correct
59 Correct 1 ms 6492 KB Output is correct
60 Correct 1 ms 6492 KB Output is correct
61 Correct 1 ms 6488 KB Output is correct
62 Correct 1 ms 6492 KB Output is correct
63 Correct 1 ms 6492 KB Output is correct
64 Correct 2 ms 6492 KB Output is correct
65 Correct 1 ms 6492 KB Output is correct
66 Correct 28 ms 11348 KB Output is correct
67 Correct 27 ms 11096 KB Output is correct
68 Correct 27 ms 11100 KB Output is correct
69 Correct 28 ms 11096 KB Output is correct
70 Correct 1 ms 6488 KB Output is correct
71 Correct 1 ms 6492 KB Output is correct
72 Correct 15 ms 6748 KB Output is correct
73 Correct 3 ms 6748 KB Output is correct
74 Correct 57 ms 18516 KB Output is correct
75 Correct 53 ms 16716 KB Output is correct
76 Correct 1 ms 6488 KB Output is correct
77 Correct 1 ms 6744 KB Output is correct
78 Correct 1 ms 6492 KB Output is correct
79 Correct 1 ms 6492 KB Output is correct
80 Correct 1 ms 6492 KB Output is correct
81 Correct 1 ms 6492 KB Output is correct
82 Correct 1 ms 6492 KB Output is correct
83 Correct 1 ms 6492 KB Output is correct
84 Correct 1 ms 6492 KB Output is correct
85 Correct 1 ms 6608 KB Output is correct
86 Correct 1 ms 6492 KB Output is correct
87 Correct 1 ms 2396 KB Output is correct
88 Correct 1 ms 2396 KB Output is correct
89 Correct 2 ms 2396 KB Output is correct
90 Correct 1 ms 2396 KB Output is correct
91 Correct 1 ms 2396 KB Output is correct
92 Correct 12 ms 6492 KB Output is correct
93 Correct 3 ms 6492 KB Output is correct
94 Correct 4 ms 6492 KB Output is correct
95 Correct 6 ms 6728 KB Output is correct
96 Correct 3 ms 6488 KB Output is correct
97 Correct 3 ms 6492 KB Output is correct
98 Correct 3 ms 6492 KB Output is correct
99 Correct 38 ms 6488 KB Output is correct
100 Correct 18 ms 6492 KB Output is correct
101 Correct 43 ms 6748 KB Output is correct
102 Correct 8 ms 6748 KB Output is correct
103 Correct 3 ms 6492 KB Output is correct
104 Correct 3 ms 6748 KB Output is correct
105 Correct 6 ms 6748 KB Output is correct
106 Correct 2 ms 6492 KB Output is correct
107 Correct 2 ms 6492 KB Output is correct
108 Correct 2 ms 6748 KB Output is correct
109 Correct 38 ms 6748 KB Output is correct
110 Correct 15 ms 6492 KB Output is correct
111 Correct 51 ms 14528 KB Output is correct
112 Correct 50 ms 14420 KB Output is correct
113 Correct 49 ms 14424 KB Output is correct
114 Correct 48 ms 14416 KB Output is correct
115 Incorrect 48 ms 17100 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
116 Halted 0 ms 0 KB -