Submission #661149

# Submission time Handle Problem Language Result Execution time Memory
661149 2022-11-24T17:20:18 Z rainboy IOI Fever (JOI21_fever) C
100 / 100
3167 ms 37552 KB
#include <stdio.h>

#define N	100000
#define N_	(1 << 17)	/* N_ = pow2(ceil(log2(N))) */
#define INF	0x3f3f3f3f

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

unsigned int X = 12345;

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

int xx[N], yy[N], tt[N], zz[8][N], ii[8][N], pp[8][N], n, n_, hx, hy;

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 = zz[hy][ii[j]] != zz[hy][i_] ? zz[hy][ii[j]] - zz[hy][i_] : zz[hx][ii[j]] - zz[hx][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 st[8][N_ * 2], aa[8][N_ * 2], bb[8][N_ * 2];

void pul(int *st, int *aa, int *bb, int i) {
	int l = i << 1, r = l | 1;

	bb[i] = min(bb[l], bb[r]), st[i] = min(st[l], st[r]);
	if (bb[i] != INF && aa[i] != -INF)
		st[i] = min(st[i], bb[i] - aa[i]);
}

void pull(int *st, int *aa, int *bb, int i) {
	while (i > 1)
		pul(st, aa, bb, i >>= 1);
}

void put(int *st, int *aa, int *bb, int i, int x) {
	aa[i] = max(aa[i], x);
	if (bb[i] != INF && aa[i] != -INF)
		st[i] = min(st[i], bb[i] - aa[i]);
}

void update(int *st, int *aa, int *bb, int l, int r, int x) {
	if (l <= r) {
		int l_ = l += n_, r_ = r += n_;

		for ( ; l <= r; l >>= 1, r >>= 1) {
			if ((l & 1) == 1)
				put(st, aa, bb, l++, x);
			if ((r & 1) == 0)
				put(st, aa, bb, r--, x);
		}
		pull(st, aa, bb, l_), pull(st, aa, bb, r_);
	}
}

void upd(int *st, int *aa, int *bb, int i) {
	i += n_, st[i] = bb[i] = INF, aa[i] = -INF, pull(st, aa, bb, i);
}

int query(int *st, int *bb) {
	int i = 1;

	while (i < n_)
		if (st[i] == st[i << 1 | 0])
			i = i << 1 | 0;
		else if (st[i] == st[i << 1 | 1])
			i = i << 1 | 1;
		else
			break;
	while (i < n_)
		i = bb[i] == bb[i << 1 | 0] ? i << 1 | 0 : i << 1 | 1;
	return i - n_;
}

int search(int hx, int x, int y) {
	int hy = (hx + 2) % 8, lower = -1, upper = n;

	while (upper - lower > 1) {
		int i = (lower + upper) / 2;

		if (zz[hy][ii[hx][i]] < y || zz[hy][ii[hx][i]] == y && zz[hx][ii[hx][i]] < x)
			lower = i;
		else
			upper = i;
	}
	return upper;
}

int solve() {
	int h, hl, hr, h_, i, k, d;

	for (i = 0; i < n; i++) {
		zz[0][i] = +xx[i], zz[1][i] = +xx[i] + yy[i];
		zz[2][i] = +yy[i], zz[3][i] = -xx[i] + yy[i];
		zz[4][i] = -xx[i], zz[5][i] = -xx[i] - yy[i];
		zz[6][i] = -yy[i], zz[7][i] = +xx[i] - yy[i];
	}
	n_ = 1;
	while (n_ < n)
		n_ <<= 1;
	for (h = 0; h < 8; h++) {
		for (i = 0; i < n; i++)
			ii[h][i] = i;
		hx = h, hy = (h + 2) % 8, sort(ii[h], 0, n);
		for (i = 0; i < n; i++)
			pp[h][ii[h][i]] = i;
		for (i = 0; i < n_ * 2; i++)
			st[h][i] = INF, aa[h][i] = -INF, bb[h][i] = -INF;
		for (i = 0; i < n; i++)
			bb[h][n_ + i] = zz[hx][ii[h][i]];
		for (i = n_ - 1; i > 0; i--)
			pul(st[h], aa[h], bb[h], i);
	}
	for (i = 0; i < n; i++)
		if (zz[7][i] <= 0 && zz[1][i] <= 0)
			tt[i] = 0;
		else if (zz[7][i] > 0 && zz[1][i] <= 0)
			tt[i] = 1;
		else if (zz[7][i] > 0 && zz[1][i] > 0)
			tt[i] = 2;
		else
			tt[i] = 3;
	for (h = 0; h < 8; h++)
		update(st[h], aa[h], bb[h], pp[h][0], pp[h][0], zz[h][0]);
	k = 0;
	while (1) {
		h_ = -1;
		for (h = 0; h < 8; h++)
			if (st[h][1] != INF && (h_ == -1 || st[h_][1] > st[h][1]))
				h_ = h;
		if (h_ == -1)
			break;
		k++;
		i = ii[h_][query(st[h_], bb[h_])], d = st[h_][1];
		for (h = 0; h < 8; h++)
			upd(st[h], aa[h], bb[h], pp[h][i]);
		if (tt[i] == 0)
			hl = 7, hr = 9;
		else if (tt[i] == 1)
			hl = 1, hr = 3;
		else if (tt[i] == 2)
			hl = 3, hr = 5;
		else
			hl = 5, hr = 7;
		for (h = hl; h <= hr; h++) {
			hx = h % 8, hy = (hx + 2) % 8;
			update(st[hx], aa[hx], bb[hx], search(hx, zz[hx][i] + d, zz[hy][i]), search(hx, INF, zz[hy][i]) - 1, zz[hx][i]);
		}
	}
	return k;
}

int main() {
	int h, i, k_, tmp;

	scanf("%d", &n);
	for (i = 0; i < n; i++)
		scanf("%d%d", &xx[i], &yy[i]);
	for (i = 1; i < n; i++)
		xx[i] -= xx[0], yy[i] -= yy[0];
	xx[0] = 0, yy[0] = 0;
	k_ = 0;
	for (h = 0; h < 4; h++) {
		k_ = max(k_, solve());
		for (i = 0; i < n; i++)
			tmp = xx[i], xx[i] = -yy[i], yy[i] = tmp;
	}
	printf("%d\n", k_);
	return 0;
}

Compilation message

fever.c: In function 'search':
fever.c:100:55: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  100 |   if (zz[hy][ii[hx][i]] < y || zz[hy][ii[hx][i]] == y && zz[hx][ii[hx][i]] < x)
      |                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
fever.c: In function 'main':
fever.c:175:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
  175 |  scanf("%d", &n);
      |  ^~~~~~~~~~~~~~~
fever.c:177:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
  177 |   scanf("%d%d", &xx[i], &yy[i]);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
3 Correct 0 ms 544 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 552 KB Output is correct
7 Correct 1 ms 548 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
9 Correct 0 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 468 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 548 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 0 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 548 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 1 ms 556 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 552 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
3 Correct 0 ms 544 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 552 KB Output is correct
7 Correct 1 ms 548 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
9 Correct 0 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 468 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 548 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 0 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 548 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 1 ms 556 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 552 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 468 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 548 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 552 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 1 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 572 KB Output is correct
2 Correct 1 ms 548 KB Output is correct
3 Correct 1 ms 468 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 1 ms 552 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
3 Correct 0 ms 544 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 552 KB Output is correct
7 Correct 1 ms 548 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
9 Correct 0 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 468 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 548 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 0 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 548 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 1 ms 556 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 552 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 468 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 548 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 552 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 1 ms 468 KB Output is correct
46 Correct 1 ms 572 KB Output is correct
47 Correct 1 ms 548 KB Output is correct
48 Correct 1 ms 468 KB Output is correct
49 Correct 1 ms 468 KB Output is correct
50 Correct 1 ms 468 KB Output is correct
51 Correct 1 ms 468 KB Output is correct
52 Correct 1 ms 552 KB Output is correct
53 Correct 1 ms 468 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 468 KB Output is correct
60 Correct 1 ms 552 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 1 ms 468 KB Output is correct
64 Correct 1 ms 468 KB Output is correct
65 Correct 2 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
3 Correct 0 ms 544 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 552 KB Output is correct
7 Correct 1 ms 548 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
9 Correct 0 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 468 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 548 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 0 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 548 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 1 ms 556 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 552 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 468 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 548 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 552 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 1 ms 468 KB Output is correct
46 Correct 1 ms 572 KB Output is correct
47 Correct 1 ms 548 KB Output is correct
48 Correct 1 ms 468 KB Output is correct
49 Correct 1 ms 468 KB Output is correct
50 Correct 1 ms 468 KB Output is correct
51 Correct 1 ms 468 KB Output is correct
52 Correct 1 ms 552 KB Output is correct
53 Correct 1 ms 468 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 468 KB Output is correct
60 Correct 1 ms 552 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 1 ms 468 KB Output is correct
64 Correct 1 ms 468 KB Output is correct
65 Correct 2 ms 468 KB Output is correct
66 Correct 18 ms 1672 KB Output is correct
67 Correct 14 ms 1588 KB Output is correct
68 Correct 14 ms 1588 KB Output is correct
69 Correct 45 ms 1640 KB Output is correct
70 Correct 28 ms 1652 KB Output is correct
71 Correct 17 ms 1664 KB Output is correct
72 Correct 15 ms 1668 KB Output is correct
73 Correct 14 ms 1620 KB Output is correct
74 Correct 22 ms 1620 KB Output is correct
75 Correct 32 ms 1620 KB Output is correct
76 Correct 16 ms 1628 KB Output is correct
77 Correct 15 ms 1620 KB Output is correct
78 Correct 17 ms 1620 KB Output is correct
79 Correct 15 ms 1704 KB Output is correct
80 Correct 14 ms 1620 KB Output is correct
81 Correct 16 ms 1632 KB Output is correct
82 Correct 22 ms 1628 KB Output is correct
83 Correct 23 ms 1620 KB Output is correct
84 Correct 12 ms 1620 KB Output is correct
85 Correct 13 ms 1644 KB Output is correct
86 Correct 15 ms 1588 KB Output is correct
87 Correct 12 ms 1684 KB Output is correct
88 Correct 20 ms 1740 KB Output is correct
89 Correct 20 ms 1588 KB Output is correct
90 Correct 21 ms 1620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
3 Correct 0 ms 544 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 552 KB Output is correct
7 Correct 1 ms 548 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
9 Correct 0 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 468 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 548 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 0 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 548 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 1 ms 556 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 552 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 468 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 548 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 552 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 1 ms 468 KB Output is correct
46 Correct 1 ms 572 KB Output is correct
47 Correct 1 ms 548 KB Output is correct
48 Correct 1 ms 468 KB Output is correct
49 Correct 1 ms 468 KB Output is correct
50 Correct 1 ms 468 KB Output is correct
51 Correct 1 ms 468 KB Output is correct
52 Correct 1 ms 552 KB Output is correct
53 Correct 1 ms 468 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 468 KB Output is correct
60 Correct 1 ms 552 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 1 ms 468 KB Output is correct
64 Correct 1 ms 468 KB Output is correct
65 Correct 2 ms 468 KB Output is correct
66 Correct 450 ms 34364 KB Output is correct
67 Correct 573 ms 36476 KB Output is correct
68 Correct 576 ms 36476 KB Output is correct
69 Correct 1112 ms 36556 KB Output is correct
70 Correct 1825 ms 37416 KB Output is correct
71 Correct 558 ms 37496 KB Output is correct
72 Correct 583 ms 36900 KB Output is correct
73 Correct 692 ms 37472 KB Output is correct
74 Correct 557 ms 37372 KB Output is correct
75 Correct 594 ms 37368 KB Output is correct
76 Correct 871 ms 37400 KB Output is correct
77 Correct 555 ms 37292 KB Output is correct
78 Correct 937 ms 37416 KB Output is correct
79 Correct 902 ms 37412 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 552 KB Output is correct
3 Correct 0 ms 544 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 552 KB Output is correct
7 Correct 1 ms 548 KB Output is correct
8 Correct 1 ms 468 KB Output is correct
9 Correct 0 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 468 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 548 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 0 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 548 KB Output is correct
25 Correct 1 ms 468 KB Output is correct
26 Correct 1 ms 468 KB Output is correct
27 Correct 1 ms 556 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 552 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
33 Correct 1 ms 468 KB Output is correct
34 Correct 1 ms 468 KB Output is correct
35 Correct 1 ms 468 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 548 KB Output is correct
39 Correct 1 ms 468 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 552 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 1 ms 468 KB Output is correct
46 Correct 1 ms 572 KB Output is correct
47 Correct 1 ms 548 KB Output is correct
48 Correct 1 ms 468 KB Output is correct
49 Correct 1 ms 468 KB Output is correct
50 Correct 1 ms 468 KB Output is correct
51 Correct 1 ms 468 KB Output is correct
52 Correct 1 ms 552 KB Output is correct
53 Correct 1 ms 468 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 468 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 468 KB Output is correct
59 Correct 1 ms 468 KB Output is correct
60 Correct 1 ms 552 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 1 ms 468 KB Output is correct
64 Correct 1 ms 468 KB Output is correct
65 Correct 2 ms 468 KB Output is correct
66 Correct 18 ms 1672 KB Output is correct
67 Correct 14 ms 1588 KB Output is correct
68 Correct 14 ms 1588 KB Output is correct
69 Correct 45 ms 1640 KB Output is correct
70 Correct 28 ms 1652 KB Output is correct
71 Correct 17 ms 1664 KB Output is correct
72 Correct 15 ms 1668 KB Output is correct
73 Correct 14 ms 1620 KB Output is correct
74 Correct 22 ms 1620 KB Output is correct
75 Correct 32 ms 1620 KB Output is correct
76 Correct 16 ms 1628 KB Output is correct
77 Correct 15 ms 1620 KB Output is correct
78 Correct 17 ms 1620 KB Output is correct
79 Correct 15 ms 1704 KB Output is correct
80 Correct 14 ms 1620 KB Output is correct
81 Correct 16 ms 1632 KB Output is correct
82 Correct 22 ms 1628 KB Output is correct
83 Correct 23 ms 1620 KB Output is correct
84 Correct 12 ms 1620 KB Output is correct
85 Correct 13 ms 1644 KB Output is correct
86 Correct 15 ms 1588 KB Output is correct
87 Correct 12 ms 1684 KB Output is correct
88 Correct 20 ms 1740 KB Output is correct
89 Correct 20 ms 1588 KB Output is correct
90 Correct 21 ms 1620 KB Output is correct
91 Correct 450 ms 34364 KB Output is correct
92 Correct 573 ms 36476 KB Output is correct
93 Correct 576 ms 36476 KB Output is correct
94 Correct 1112 ms 36556 KB Output is correct
95 Correct 1825 ms 37416 KB Output is correct
96 Correct 558 ms 37496 KB Output is correct
97 Correct 583 ms 36900 KB Output is correct
98 Correct 692 ms 37472 KB Output is correct
99 Correct 557 ms 37372 KB Output is correct
100 Correct 594 ms 37368 KB Output is correct
101 Correct 871 ms 37400 KB Output is correct
102 Correct 555 ms 37292 KB Output is correct
103 Correct 937 ms 37416 KB Output is correct
104 Correct 902 ms 37412 KB Output is correct
105 Correct 1846 ms 34028 KB Output is correct
106 Correct 2382 ms 36184 KB Output is correct
107 Correct 3167 ms 36212 KB Output is correct
108 Correct 2624 ms 36300 KB Output is correct
109 Correct 671 ms 36408 KB Output is correct
110 Correct 581 ms 36552 KB Output is correct
111 Correct 554 ms 37364 KB Output is correct
112 Correct 565 ms 36784 KB Output is correct
113 Correct 591 ms 36780 KB Output is correct
114 Correct 1971 ms 36824 KB Output is correct
115 Correct 693 ms 37304 KB Output is correct
116 Correct 564 ms 36940 KB Output is correct
117 Correct 619 ms 36920 KB Output is correct
118 Correct 1463 ms 36828 KB Output is correct
119 Correct 1136 ms 37440 KB Output is correct
120 Correct 565 ms 36784 KB Output is correct
121 Correct 655 ms 37552 KB Output is correct
122 Correct 786 ms 37380 KB Output is correct
123 Correct 1123 ms 36800 KB Output is correct
124 Correct 1155 ms 37280 KB Output is correct
125 Correct 473 ms 36812 KB Output is correct
126 Correct 495 ms 37008 KB Output is correct
127 Correct 642 ms 37312 KB Output is correct
128 Correct 487 ms 37184 KB Output is correct
129 Correct 462 ms 36940 KB Output is correct