답안 #494190

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
494190 2021-12-14T17:35:02 Z rainboy L-triominoes (CEOI21_ltriominoes) C
100 / 100
2115 ms 580 KB
#include <stdio.h>
#include <string.h>

#define N	13
#define M	1000
#define R	20
#define K	250

unsigned int X = 12345;

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

void advance(char *dp, int n, int c) {
	static char dq[N][1 << N + 1];
	int i, b;

	for (i = 0; i < n; i++)
		memset(dq[i], 0, (1 << n + 1) * sizeof *dq[i]);
	for (b = 0; b < 1 << n; b++)
		if (dp[b]) {
			dq[0][b << 1 | (c & 1)] = 1;
			if ((c & 1) == 0 && (b & 1 << n - 1) == 0 && (b & 1 << n - 2) == 0)
				dq[0][b << 1 | 1 << n | 1 << n - 1 | 1 << 0] = 1;
		}
	for (i = 0; i + 1 < n; i++)
		for (b = 0; b < 1 << n + 1; b++)
			if (dq[i][b]) {
				int b_ = b << 1 & (1 << n + 1) - 1;

				if ((c & 1 << i + 1) != 0) {
					if ((b & 1 << n) != 0)
						dq[i + 1][b_ | 1 << 0] = 1;
				} else if ((b & 1 << n) != 0) {
					dq[i + 1][b_] = 1;
					if ((b & 1 << 0) == 0 && (b & 1 << n - 1) == 0)
						dq[i + 1][b_ | 1 << 0 | 1 << 1 | 1 << n] = 1;
					if (i + 2 < n && (b & 1 << n - 1) == 0 && (b & 1 << n - 2) == 0)
						dq[i + 1][b_ | 1 << 0 | 1 << n - 1 | 1 << n] = 1;
				} else {
					if ((b & 1 << 0) == 0)
						dq[i + 1][b_ | 1 << 0 | 1 << 1] = 1;
					if ((b & 1 << n - 1) == 0)
						dq[i + 1][b_ | 1 << 0 | 1 << n] = 1;
				}
			}
	memset(dp, 0, (1 << n) * sizeof *dp);
	for (b = 0; b < 1 << n; b++)
		if (dq[n - 1][b | 1 << n])
			dp[b] = 1;
}

int ii[K], jj[K];

void sort(int *hh, int l, int r) {
	while (l < r) {
		int i = l, j = l, k = r, h = hh[l + rand_() % (r - l)], tmp;

		while (j < k)
			if (jj[hh[j]] == jj[h])
				j++;
			else if (jj[hh[j]] < jj[h]) {
				tmp = hh[i], hh[i] = hh[j], hh[j] = tmp;
				i++, j++;
			} else {
				k--;
				tmp = hh[j], hh[j] = hh[k], hh[k] = tmp;
			}
		sort(hh, l, i);
		l = k;
	}
}

void advance0(char *dp, int n, int k) {
	if (k >= R)
		k -= ((k - R) / 6 + 1) * 6;
	while (k--)
		advance(dp, n, 0);
}

int main() {
#if 0
	static char dp_[R][1 << N];
	int n, b;

	for (n = 1; n <= 13; n++) {
		printf("trying %d\n", n);
		for (b = 0; b < 1 << n; b++) {
			int b_, h;

			memset(dp_[0], 0, (1 << n) * sizeof *dp_[0]), dp_[0][b] = 1;
			for (h = 1; h < R; h++) {
				memcpy(dp_[h], dp_[h - 1], (1 << n) * sizeof *dp_[h - 1]);
				advance(dp_[h], n, 0);
			}
			for (b_ = 0; b_ < 1 << n; b_++)
				if (dp_[R - 1][b_] != dp_[R - 7][b_]) {
					printf("conjecture disproven :(\n");
					return 0;
				}
		}
	}
#else
	static char dp[1 << N];
	static int hh[K];
	int n, m, k, h, h_, j, j_, b;

	scanf("%d%d%d", &n, &m, &k);
	for (h = 0; h < k; h++) {
		scanf("%d%d", &ii[h], &jj[h]), ii[h]--, jj[h]--;
		hh[h] = h;
	}
	sort(hh, 0, k);
	dp[(1 << n) - 1] = 1;
	for (h = 0, j = -1; h < k; h = h_) {
		j_ = jj[hh[h]];
		h_ = h;
		b = 0;
		while (h_ < k && jj[hh[h_]] == j_)
			b |= 1 << ii[hh[h_++]];
		advance0(dp, n, j_ - 1 - j), advance(dp, n, b);
		j = j_;
	}
	advance0(dp, n, m - 1 - j);
	printf(dp[(1 << n) - 1] ? "YES\n" : "NO\n");
#endif
	return 0;
}

Compilation message

ltrominoes.c: In function 'advance':
ltrominoes.c:16:22: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   16 |  static char dq[N][1 << N + 1];
      |                      ^~
ltrominoes.c:20:28: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   20 |   memset(dq[i], 0, (1 << n + 1) * sizeof *dq[i]);
      |                          ~~^~~
ltrominoes.c:24:36: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   24 |    if ((c & 1) == 0 && (b & 1 << n - 1) == 0 && (b & 1 << n - 2) == 0)
      |                                  ~~^~~
ltrominoes.c:24:61: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   24 |    if ((c & 1) == 0 && (b & 1 << n - 1) == 0 && (b & 1 << n - 2) == 0)
      |                                                           ~~^~~
ltrominoes.c:25:36: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   25 |     dq[0][b << 1 | 1 << n | 1 << n - 1 | 1 << 0] = 1;
      |                                  ~~^~~
ltrominoes.c:28:26: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   28 |   for (b = 0; b < 1 << n + 1; b++)
      |                        ~~^~~
ltrominoes.c:30:31: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   30 |     int b_ = b << 1 & (1 << n + 1) - 1;
      |                             ~~^~~
ltrominoes.c:30:36: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
   30 |     int b_ = b << 1 & (1 << n + 1) - 1;
      |                       ~~~~~~~~~~~~~^~~
ltrominoes.c:32:21: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   32 |     if ((c & 1 << i + 1) != 0) {
      |                   ~~^~~
ltrominoes.c:37:43: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   37 |      if ((b & 1 << 0) == 0 && (b & 1 << n - 1) == 0)
      |                                         ~~^~~
ltrominoes.c:39:35: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   39 |      if (i + 2 < n && (b & 1 << n - 1) == 0 && (b & 1 << n - 2) == 0)
      |                                 ~~^~~
ltrominoes.c:39:60: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   39 |      if (i + 2 < n && (b & 1 << n - 1) == 0 && (b & 1 << n - 2) == 0)
      |                                                          ~~^~~
ltrominoes.c:40:38: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   40 |       dq[i + 1][b_ | 1 << 0 | 1 << n - 1 | 1 << n] = 1;
      |                                    ~~^~~
ltrominoes.c:44:22: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
   44 |      if ((b & 1 << n - 1) == 0)
      |                    ~~^~~
ltrominoes.c: In function 'main':
ltrominoes.c:109:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
  109 |  scanf("%d%d%d", &n, &m, &k);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ltrominoes.c:111:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
  111 |   scanf("%d%d", &ii[h], &jj[h]), ii[h]--, jj[h]--;
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 3 ms 332 KB Output is correct
9 Correct 3 ms 332 KB Output is correct
10 Correct 2 ms 332 KB Output is correct
11 Correct 8 ms 428 KB Output is correct
12 Correct 2 ms 332 KB Output is correct
13 Correct 0 ms 204 KB Output is correct
14 Correct 0 ms 276 KB Output is correct
15 Correct 4 ms 392 KB Output is correct
16 Correct 382 ms 476 KB Output is correct
17 Correct 25 ms 332 KB Output is correct
18 Correct 184 ms 408 KB Output is correct
19 Correct 5 ms 204 KB Output is correct
20 Correct 328 ms 460 KB Output is correct
21 Correct 174 ms 332 KB Output is correct
22 Correct 1 ms 288 KB Output is correct
23 Correct 4 ms 204 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 178 ms 472 KB Output is correct
26 Correct 149 ms 460 KB Output is correct
27 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 3 ms 408 KB Output is correct
6 Correct 1 ms 332 KB Output is correct
7 Correct 1 ms 280 KB Output is correct
8 Correct 0 ms 332 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 0 ms 204 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 1 ms 204 KB Output is correct
14 Correct 0 ms 204 KB Output is correct
15 Correct 1 ms 204 KB Output is correct
16 Correct 0 ms 204 KB Output is correct
17 Correct 0 ms 204 KB Output is correct
18 Correct 6 ms 408 KB Output is correct
19 Correct 9 ms 460 KB Output is correct
20 Correct 0 ms 284 KB Output is correct
21 Correct 0 ms 204 KB Output is correct
22 Correct 0 ms 332 KB Output is correct
23 Correct 1 ms 332 KB Output is correct
24 Correct 1 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 276 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 1 ms 284 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 0 ms 204 KB Output is correct
11 Correct 1 ms 288 KB Output is correct
12 Correct 0 ms 204 KB Output is correct
13 Correct 1 ms 288 KB Output is correct
14 Correct 0 ms 204 KB Output is correct
15 Correct 0 ms 204 KB Output is correct
16 Correct 0 ms 204 KB Output is correct
17 Correct 1 ms 204 KB Output is correct
18 Correct 1 ms 204 KB Output is correct
19 Correct 0 ms 204 KB Output is correct
20 Correct 1 ms 204 KB Output is correct
21 Correct 0 ms 204 KB Output is correct
22 Correct 0 ms 204 KB Output is correct
23 Correct 0 ms 204 KB Output is correct
24 Correct 0 ms 204 KB Output is correct
25 Correct 0 ms 204 KB Output is correct
26 Correct 1 ms 204 KB Output is correct
27 Correct 0 ms 204 KB Output is correct
28 Correct 0 ms 204 KB Output is correct
29 Correct 0 ms 204 KB Output is correct
30 Correct 1 ms 204 KB Output is correct
31 Correct 0 ms 204 KB Output is correct
32 Correct 0 ms 204 KB Output is correct
33 Correct 1 ms 204 KB Output is correct
34 Correct 1 ms 204 KB Output is correct
35 Correct 1 ms 204 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 1 ms 204 KB Output is correct
38 Correct 1 ms 204 KB Output is correct
39 Correct 1 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 1 ms 288 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 1 ms 284 KB Output is correct
44 Correct 1 ms 204 KB Output is correct
45 Correct 1 ms 204 KB Output is correct
46 Correct 0 ms 204 KB Output is correct
47 Correct 1 ms 204 KB Output is correct
48 Correct 1 ms 204 KB Output is correct
49 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 3 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 0 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 2 ms 280 KB Output is correct
11 Correct 3 ms 204 KB Output is correct
12 Correct 8 ms 308 KB Output is correct
13 Correct 2 ms 204 KB Output is correct
14 Correct 2 ms 204 KB Output is correct
15 Correct 3 ms 204 KB Output is correct
16 Correct 6 ms 204 KB Output is correct
17 Correct 2 ms 280 KB Output is correct
18 Correct 2 ms 204 KB Output is correct
19 Correct 3 ms 204 KB Output is correct
20 Correct 9 ms 308 KB Output is correct
21 Correct 4 ms 204 KB Output is correct
22 Correct 7 ms 288 KB Output is correct
23 Correct 1 ms 204 KB Output is correct
24 Correct 3 ms 204 KB Output is correct
25 Correct 3 ms 204 KB Output is correct
26 Correct 1 ms 204 KB Output is correct
27 Correct 2 ms 204 KB Output is correct
28 Correct 1 ms 204 KB Output is correct
29 Correct 2 ms 204 KB Output is correct
30 Correct 1 ms 284 KB Output is correct
31 Correct 2 ms 204 KB Output is correct
32 Correct 5 ms 204 KB Output is correct
33 Correct 5 ms 204 KB Output is correct
34 Correct 3 ms 304 KB Output is correct
35 Correct 4 ms 204 KB Output is correct
36 Correct 1 ms 204 KB Output is correct
37 Correct 2 ms 308 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 204 KB Output is correct
2 Correct 3 ms 204 KB Output is correct
3 Correct 8 ms 332 KB Output is correct
4 Correct 429 ms 408 KB Output is correct
5 Correct 188 ms 452 KB Output is correct
6 Correct 225 ms 352 KB Output is correct
7 Correct 63 ms 332 KB Output is correct
8 Correct 80 ms 332 KB Output is correct
9 Correct 21 ms 360 KB Output is correct
10 Correct 28 ms 276 KB Output is correct
11 Correct 3 ms 332 KB Output is correct
12 Correct 4 ms 332 KB Output is correct
13 Correct 1 ms 332 KB Output is correct
14 Correct 4 ms 332 KB Output is correct
15 Correct 13 ms 308 KB Output is correct
16 Correct 8 ms 312 KB Output is correct
17 Correct 26 ms 356 KB Output is correct
18 Correct 32 ms 332 KB Output is correct
19 Correct 32 ms 356 KB Output is correct
20 Correct 597 ms 420 KB Output is correct
21 Correct 283 ms 384 KB Output is correct
22 Correct 18 ms 204 KB Output is correct
23 Correct 82 ms 336 KB Output is correct
24 Correct 1793 ms 476 KB Output is correct
25 Correct 831 ms 424 KB Output is correct
26 Correct 1779 ms 484 KB Output is correct
27 Correct 1805 ms 476 KB Output is correct
28 Correct 410 ms 472 KB Output is correct
29 Correct 815 ms 484 KB Output is correct
30 Correct 899 ms 472 KB Output is correct
31 Correct 644 ms 476 KB Output is correct
32 Correct 546 ms 476 KB Output is correct
33 Correct 595 ms 332 KB Output is correct
34 Correct 1384 ms 476 KB Output is correct
35 Correct 2102 ms 472 KB Output is correct
36 Correct 1617 ms 472 KB Output is correct
37 Correct 164 ms 408 KB Output is correct
38 Correct 382 ms 408 KB Output is correct
39 Correct 289 ms 364 KB Output is correct
40 Correct 1426 ms 472 KB Output is correct
41 Correct 309 ms 352 KB Output is correct
42 Correct 1343 ms 476 KB Output is correct
43 Correct 1228 ms 480 KB Output is correct
44 Correct 1291 ms 580 KB Output is correct
45 Correct 1278 ms 472 KB Output is correct
46 Correct 208 ms 416 KB Output is correct
47 Correct 978 ms 476 KB Output is correct
48 Correct 832 ms 472 KB Output is correct
49 Correct 265 ms 460 KB Output is correct
50 Correct 99 ms 332 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 3 ms 332 KB Output is correct
9 Correct 3 ms 332 KB Output is correct
10 Correct 2 ms 332 KB Output is correct
11 Correct 8 ms 428 KB Output is correct
12 Correct 2 ms 332 KB Output is correct
13 Correct 0 ms 204 KB Output is correct
14 Correct 0 ms 276 KB Output is correct
15 Correct 4 ms 392 KB Output is correct
16 Correct 382 ms 476 KB Output is correct
17 Correct 25 ms 332 KB Output is correct
18 Correct 184 ms 408 KB Output is correct
19 Correct 5 ms 204 KB Output is correct
20 Correct 328 ms 460 KB Output is correct
21 Correct 174 ms 332 KB Output is correct
22 Correct 1 ms 288 KB Output is correct
23 Correct 4 ms 204 KB Output is correct
24 Correct 1 ms 204 KB Output is correct
25 Correct 178 ms 472 KB Output is correct
26 Correct 149 ms 460 KB Output is correct
27 Correct 1 ms 204 KB Output is correct
28 Correct 0 ms 204 KB Output is correct
29 Correct 0 ms 208 KB Output is correct
30 Correct 0 ms 204 KB Output is correct
31 Correct 0 ms 204 KB Output is correct
32 Correct 3 ms 408 KB Output is correct
33 Correct 1 ms 332 KB Output is correct
34 Correct 1 ms 280 KB Output is correct
35 Correct 0 ms 332 KB Output is correct
36 Correct 0 ms 204 KB Output is correct
37 Correct 0 ms 204 KB Output is correct
38 Correct 0 ms 204 KB Output is correct
39 Correct 0 ms 204 KB Output is correct
40 Correct 1 ms 204 KB Output is correct
41 Correct 0 ms 204 KB Output is correct
42 Correct 1 ms 204 KB Output is correct
43 Correct 0 ms 204 KB Output is correct
44 Correct 0 ms 204 KB Output is correct
45 Correct 6 ms 408 KB Output is correct
46 Correct 9 ms 460 KB Output is correct
47 Correct 0 ms 284 KB Output is correct
48 Correct 0 ms 204 KB Output is correct
49 Correct 0 ms 332 KB Output is correct
50 Correct 1 ms 332 KB Output is correct
51 Correct 1 ms 332 KB Output is correct
52 Correct 0 ms 204 KB Output is correct
53 Correct 0 ms 276 KB Output is correct
54 Correct 0 ms 204 KB Output is correct
55 Correct 1 ms 204 KB Output is correct
56 Correct 0 ms 204 KB Output is correct
57 Correct 0 ms 204 KB Output is correct
58 Correct 0 ms 204 KB Output is correct
59 Correct 1 ms 284 KB Output is correct
60 Correct 0 ms 204 KB Output is correct
61 Correct 0 ms 204 KB Output is correct
62 Correct 1 ms 288 KB Output is correct
63 Correct 0 ms 204 KB Output is correct
64 Correct 1 ms 288 KB Output is correct
65 Correct 0 ms 204 KB Output is correct
66 Correct 0 ms 204 KB Output is correct
67 Correct 0 ms 204 KB Output is correct
68 Correct 1 ms 204 KB Output is correct
69 Correct 1 ms 204 KB Output is correct
70 Correct 0 ms 204 KB Output is correct
71 Correct 1 ms 204 KB Output is correct
72 Correct 0 ms 204 KB Output is correct
73 Correct 0 ms 204 KB Output is correct
74 Correct 0 ms 204 KB Output is correct
75 Correct 0 ms 204 KB Output is correct
76 Correct 0 ms 204 KB Output is correct
77 Correct 1 ms 204 KB Output is correct
78 Correct 0 ms 204 KB Output is correct
79 Correct 0 ms 204 KB Output is correct
80 Correct 0 ms 204 KB Output is correct
81 Correct 1 ms 204 KB Output is correct
82 Correct 0 ms 204 KB Output is correct
83 Correct 0 ms 204 KB Output is correct
84 Correct 1 ms 204 KB Output is correct
85 Correct 1 ms 204 KB Output is correct
86 Correct 1 ms 204 KB Output is correct
87 Correct 0 ms 204 KB Output is correct
88 Correct 1 ms 204 KB Output is correct
89 Correct 1 ms 204 KB Output is correct
90 Correct 1 ms 204 KB Output is correct
91 Correct 1 ms 204 KB Output is correct
92 Correct 1 ms 288 KB Output is correct
93 Correct 1 ms 204 KB Output is correct
94 Correct 1 ms 284 KB Output is correct
95 Correct 1 ms 204 KB Output is correct
96 Correct 1 ms 204 KB Output is correct
97 Correct 0 ms 204 KB Output is correct
98 Correct 1 ms 204 KB Output is correct
99 Correct 1 ms 204 KB Output is correct
100 Correct 0 ms 204 KB Output is correct
101 Correct 0 ms 204 KB Output is correct
102 Correct 1 ms 204 KB Output is correct
103 Correct 3 ms 204 KB Output is correct
104 Correct 0 ms 204 KB Output is correct
105 Correct 0 ms 204 KB Output is correct
106 Correct 0 ms 204 KB Output is correct
107 Correct 0 ms 204 KB Output is correct
108 Correct 0 ms 204 KB Output is correct
109 Correct 0 ms 204 KB Output is correct
110 Correct 2 ms 280 KB Output is correct
111 Correct 3 ms 204 KB Output is correct
112 Correct 8 ms 308 KB Output is correct
113 Correct 2 ms 204 KB Output is correct
114 Correct 2 ms 204 KB Output is correct
115 Correct 3 ms 204 KB Output is correct
116 Correct 6 ms 204 KB Output is correct
117 Correct 2 ms 280 KB Output is correct
118 Correct 2 ms 204 KB Output is correct
119 Correct 3 ms 204 KB Output is correct
120 Correct 9 ms 308 KB Output is correct
121 Correct 4 ms 204 KB Output is correct
122 Correct 7 ms 288 KB Output is correct
123 Correct 1 ms 204 KB Output is correct
124 Correct 3 ms 204 KB Output is correct
125 Correct 3 ms 204 KB Output is correct
126 Correct 1 ms 204 KB Output is correct
127 Correct 2 ms 204 KB Output is correct
128 Correct 1 ms 204 KB Output is correct
129 Correct 2 ms 204 KB Output is correct
130 Correct 1 ms 284 KB Output is correct
131 Correct 2 ms 204 KB Output is correct
132 Correct 5 ms 204 KB Output is correct
133 Correct 5 ms 204 KB Output is correct
134 Correct 3 ms 304 KB Output is correct
135 Correct 4 ms 204 KB Output is correct
136 Correct 1 ms 204 KB Output is correct
137 Correct 2 ms 308 KB Output is correct
138 Correct 2 ms 204 KB Output is correct
139 Correct 3 ms 204 KB Output is correct
140 Correct 8 ms 332 KB Output is correct
141 Correct 429 ms 408 KB Output is correct
142 Correct 188 ms 452 KB Output is correct
143 Correct 225 ms 352 KB Output is correct
144 Correct 63 ms 332 KB Output is correct
145 Correct 80 ms 332 KB Output is correct
146 Correct 21 ms 360 KB Output is correct
147 Correct 28 ms 276 KB Output is correct
148 Correct 3 ms 332 KB Output is correct
149 Correct 4 ms 332 KB Output is correct
150 Correct 1 ms 332 KB Output is correct
151 Correct 4 ms 332 KB Output is correct
152 Correct 13 ms 308 KB Output is correct
153 Correct 8 ms 312 KB Output is correct
154 Correct 26 ms 356 KB Output is correct
155 Correct 32 ms 332 KB Output is correct
156 Correct 32 ms 356 KB Output is correct
157 Correct 597 ms 420 KB Output is correct
158 Correct 283 ms 384 KB Output is correct
159 Correct 18 ms 204 KB Output is correct
160 Correct 82 ms 336 KB Output is correct
161 Correct 1793 ms 476 KB Output is correct
162 Correct 831 ms 424 KB Output is correct
163 Correct 1779 ms 484 KB Output is correct
164 Correct 1805 ms 476 KB Output is correct
165 Correct 410 ms 472 KB Output is correct
166 Correct 815 ms 484 KB Output is correct
167 Correct 899 ms 472 KB Output is correct
168 Correct 644 ms 476 KB Output is correct
169 Correct 546 ms 476 KB Output is correct
170 Correct 595 ms 332 KB Output is correct
171 Correct 1384 ms 476 KB Output is correct
172 Correct 2102 ms 472 KB Output is correct
173 Correct 1617 ms 472 KB Output is correct
174 Correct 164 ms 408 KB Output is correct
175 Correct 382 ms 408 KB Output is correct
176 Correct 289 ms 364 KB Output is correct
177 Correct 1426 ms 472 KB Output is correct
178 Correct 309 ms 352 KB Output is correct
179 Correct 1343 ms 476 KB Output is correct
180 Correct 1228 ms 480 KB Output is correct
181 Correct 1291 ms 580 KB Output is correct
182 Correct 1278 ms 472 KB Output is correct
183 Correct 208 ms 416 KB Output is correct
184 Correct 978 ms 476 KB Output is correct
185 Correct 832 ms 472 KB Output is correct
186 Correct 265 ms 460 KB Output is correct
187 Correct 99 ms 332 KB Output is correct
188 Correct 1262 ms 476 KB Output is correct
189 Correct 0 ms 204 KB Output is correct
190 Correct 0 ms 204 KB Output is correct
191 Correct 0 ms 204 KB Output is correct
192 Correct 8 ms 332 KB Output is correct
193 Correct 2 ms 204 KB Output is correct
194 Correct 1 ms 204 KB Output is correct
195 Correct 3 ms 204 KB Output is correct
196 Correct 0 ms 204 KB Output is correct
197 Correct 1 ms 204 KB Output is correct
198 Correct 0 ms 204 KB Output is correct
199 Correct 212 ms 332 KB Output is correct
200 Correct 0 ms 204 KB Output is correct
201 Correct 63 ms 352 KB Output is correct
202 Correct 20 ms 360 KB Output is correct
203 Correct 0 ms 204 KB Output is correct
204 Correct 0 ms 204 KB Output is correct
205 Correct 1 ms 204 KB Output is correct
206 Correct 0 ms 204 KB Output is correct
207 Correct 0 ms 204 KB Output is correct
208 Correct 495 ms 488 KB Output is correct
209 Correct 548 ms 580 KB Output is correct
210 Correct 16 ms 204 KB Output is correct
211 Correct 33 ms 332 KB Output is correct
212 Correct 588 ms 424 KB Output is correct
213 Correct 1 ms 204 KB Output is correct
214 Correct 93 ms 336 KB Output is correct
215 Correct 3 ms 204 KB Output is correct
216 Correct 1746 ms 472 KB Output is correct
217 Correct 1747 ms 476 KB Output is correct
218 Correct 1 ms 204 KB Output is correct
219 Correct 1 ms 204 KB Output is correct
220 Correct 1 ms 280 KB Output is correct
221 Correct 1 ms 204 KB Output is correct
222 Correct 1 ms 204 KB Output is correct
223 Correct 4 ms 204 KB Output is correct
224 Correct 1002 ms 472 KB Output is correct
225 Correct 1 ms 204 KB Output is correct
226 Correct 4 ms 204 KB Output is correct
227 Correct 2 ms 204 KB Output is correct
228 Correct 786 ms 476 KB Output is correct
229 Correct 609 ms 476 KB Output is correct
230 Correct 1245 ms 472 KB Output is correct
231 Correct 1366 ms 472 KB Output is correct
232 Correct 1 ms 204 KB Output is correct
233 Correct 1 ms 204 KB Output is correct
234 Correct 2115 ms 488 KB Output is correct
235 Correct 1 ms 204 KB Output is correct
236 Correct 394 ms 332 KB Output is correct
237 Correct 3 ms 204 KB Output is correct
238 Correct 2 ms 204 KB Output is correct
239 Correct 304 ms 360 KB Output is correct
240 Correct 1329 ms 476 KB Output is correct
241 Correct 1 ms 204 KB Output is correct
242 Correct 2 ms 204 KB Output is correct
243 Correct 0 ms 204 KB Output is correct
244 Correct 0 ms 204 KB Output is correct
245 Correct 5 ms 412 KB Output is correct