답안 #1045728

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1045728 2024-08-06T07:15:10 Z alex_2008 Toy (CEOI24_toy) C++14
100 / 100
147 ms 40532 KB
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <set>
typedef long long ll;
using namespace std;
const int N = 1510;
char a[N][N];
bool used[N][N];
int tp[N][N];
int dwn[N][N];
int lft[N][N];
int rght[N][N];
int w, h, k, l;
int cnt(int x1, int y1, int x2, int y2) {
	return a[x2][y2] - a[x1][y2] - a[x2][y1] + a[x1][y1];
}
pair<int, int> vertical_range(int x, int y) {
	if (tp[x][y] + dwn[x][y] <= l) return { 1, 0 };
	int r_min = x - tp[x][y] + 1;
	int r_mx = x + dwn[x][y] - l;
	return make_pair(r_min, r_mx);
}
pair<int, int> horizontal_range(int x, int y) {
	if (lft[x][y] + rght[x][y] <= k) return { 1, 0 };
	int c_min = y - lft[x][y] + 1;
	int c_mx = y + rght[x][y] - k;
	return make_pair(c_min, c_mx);
}
bool intersect(pair<int, int> x, pair<int, int> y) {
	pair<int, int> c = make_pair(max(x.first, y.first), min(x.second, y.second));
	if (c.first > c.second) return false;
	return true;
}
bool ch(int x, int y) {
	if ((tp[x][y] + dwn[x][y]) > l && (lft[x][y] + rght[x][y]) > k) return true;
	return false;
}
int main() {
	cin >> w >> h >> k >> l;
	int xh, yh, xv, yv;
	cin >> xh >> yh >> xv >> yv;
	xh++; xv++; yh++; yv++;
	swap(xh, yh); swap(xv, yv);
	//cout << xh << " " << yh << " " << xv << " " << yv << "\n";
	int fx = -1, fy = -1;
	for (int i = 1; i <= h; i++) {
		for (int j = 1; j <= w; j++) {
			cin >> a[i][j];
			if (a[i][j] == '*') {
				fx = i;
				fy = j;
			}
		}
	}

	for (int i = 1; i <= h; i++) {
		for (int j = 1; j <= w; j++) {
			if (a[i][j] == 'X') {
				lft[i][j] = 0;
				tp[i][j] = 0;
			}
			else {
				lft[i][j] = lft[i][j - 1] + 1;
				tp[i][j] = tp[i - 1][j] + 1;
			}
			lft[i][j] = min(lft[i][j], k);
			tp[i][j] = min(tp[i][j], l);

		}
	}
	for (int i = h; i >= 1; i--) {
		for (int j = w; j >= 1; j--) {
			if (a[i][j] == 'X') {
				rght[i][j] = 0;
				dwn[i][j] = 0;
			}
			else {
				rght[i][j] = rght[i][j + 1] + 1;
				dwn[i][j] = dwn[i + 1][j] + 1;
			}
			rght[i][j] = min(rght[i][j], k);
			dwn[i][j] = min(dwn[i][j], l);
		}
	}
	used[xh][yv] = true;
	queue <pair<int, int>> Q;
	Q.push({ xh, yv });
	while (!Q.empty()) {
		int x = Q.front().first, y = Q.front().second; Q.pop();
		if (x > 1) {
			if (intersect(horizontal_range(x, y), horizontal_range(x - 1, y)) && ch(x - 1, y)) {
				if (!used[x - 1][y]) {
					used[x - 1][y] = true;
					Q.push({ x - 1, y });
				}
			}
		}
		if (x < h) {
			if (intersect(horizontal_range(x, y), horizontal_range(x + 1, y)) && ch(x + 1, y)) {
				if (!used[x + 1][y]) {
					used[x + 1][y] = true;
					Q.push({ x + 1, y });
				}
			}
		}
		if (y > 1) {
			if (intersect(vertical_range(x, y), vertical_range(x, y - 1)) && ch(x, y - 1)) {
				if (!used[x][y - 1]) {
					used[x][y - 1] = true;
					Q.push({ x, y - 1 });
				}
			}
		}
		if (y < w) {
			if (intersect(vertical_range(x, y), vertical_range(x, y + 1)) && ch(x, y + 1)) {
				if (!used[x][y + 1]) {
					used[x][y + 1] = true;
					Q.push({ x, y + 1 });
				}
			}
		}
	}
	if (used[fx][fy]) cout << "YES\n";
	else cout << "NO\n";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6488 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6488 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6748 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 7260 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7260 KB Output is correct
8 Correct 1 ms 7260 KB Output is correct
9 Correct 1 ms 7088 KB Output is correct
10 Correct 1 ms 7260 KB Output is correct
11 Correct 1 ms 7092 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 11100 KB Output is correct
14 Correct 1 ms 11100 KB Output is correct
15 Correct 1 ms 7260 KB Output is correct
16 Correct 1 ms 7004 KB Output is correct
17 Correct 1 ms 7004 KB Output is correct
18 Correct 1 ms 7260 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7260 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 7260 KB Output is correct
23 Correct 1 ms 7260 KB Output is correct
24 Correct 1 ms 7260 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 7260 KB Output is correct
28 Correct 1 ms 7292 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 1 ms 7260 KB Output is correct
31 Correct 1 ms 7260 KB Output is correct
32 Correct 1 ms 7004 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 7260 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 1 ms 7004 KB Output is correct
38 Correct 1 ms 7260 KB Output is correct
39 Correct 1 ms 7004 KB Output is correct
40 Correct 1 ms 7260 KB Output is correct
41 Correct 1 ms 7256 KB Output is correct
42 Correct 1 ms 7260 KB Output is correct
43 Correct 1 ms 7260 KB Output is correct
44 Correct 1 ms 7256 KB Output is correct
45 Correct 1 ms 7260 KB Output is correct
46 Correct 1 ms 10844 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6488 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6748 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 7260 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7260 KB Output is correct
8 Correct 1 ms 7260 KB Output is correct
9 Correct 1 ms 7088 KB Output is correct
10 Correct 1 ms 7260 KB Output is correct
11 Correct 1 ms 7092 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 11100 KB Output is correct
14 Correct 1 ms 11100 KB Output is correct
15 Correct 1 ms 7260 KB Output is correct
16 Correct 1 ms 7004 KB Output is correct
17 Correct 1 ms 7004 KB Output is correct
18 Correct 1 ms 7260 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7260 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 7260 KB Output is correct
23 Correct 1 ms 7260 KB Output is correct
24 Correct 1 ms 7260 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 7260 KB Output is correct
28 Correct 1 ms 7292 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 1 ms 7260 KB Output is correct
31 Correct 1 ms 7260 KB Output is correct
32 Correct 1 ms 7004 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 7260 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 1 ms 7004 KB Output is correct
38 Correct 1 ms 7260 KB Output is correct
39 Correct 1 ms 7004 KB Output is correct
40 Correct 1 ms 7260 KB Output is correct
41 Correct 1 ms 7256 KB Output is correct
42 Correct 1 ms 7260 KB Output is correct
43 Correct 1 ms 7260 KB Output is correct
44 Correct 1 ms 7256 KB Output is correct
45 Correct 1 ms 7260 KB Output is correct
46 Correct 1 ms 10844 KB Output is correct
47 Correct 1 ms 7004 KB Output is correct
48 Correct 1 ms 7772 KB Output is correct
49 Correct 1 ms 7772 KB Output is correct
50 Correct 1 ms 7772 KB Output is correct
51 Correct 1 ms 7772 KB Output is correct
52 Correct 2 ms 7772 KB Output is correct
53 Correct 1 ms 7260 KB Output is correct
54 Correct 1 ms 11356 KB Output is correct
55 Correct 1 ms 7772 KB Output is correct
56 Correct 2 ms 14684 KB Output is correct
57 Correct 1 ms 11460 KB Output is correct
58 Correct 1 ms 11100 KB Output is correct
59 Correct 1 ms 7772 KB Output is correct
60 Correct 1 ms 7772 KB Output is correct
61 Correct 1 ms 7516 KB Output is correct
62 Correct 1 ms 7772 KB Output is correct
63 Correct 2 ms 7772 KB Output is correct
64 Correct 1 ms 7772 KB Output is correct
65 Correct 2 ms 7772 KB Output is correct
66 Correct 2 ms 7772 KB Output is correct
67 Correct 2 ms 7772 KB Output is correct
68 Correct 1 ms 7716 KB Output is correct
69 Correct 2 ms 7772 KB Output is correct
70 Correct 1 ms 7772 KB Output is correct
71 Correct 2 ms 7772 KB Output is correct
72 Correct 1 ms 7772 KB Output is correct
73 Correct 1 ms 7772 KB Output is correct
74 Correct 2 ms 7772 KB Output is correct
75 Correct 1 ms 7516 KB Output is correct
76 Correct 1 ms 7772 KB Output is correct
77 Correct 1 ms 7772 KB Output is correct
78 Correct 1 ms 7772 KB Output is correct
79 Correct 2 ms 7772 KB Output is correct
80 Correct 1 ms 7772 KB Output is correct
81 Correct 1 ms 7516 KB Output is correct
82 Correct 1 ms 7768 KB Output is correct
83 Correct 1 ms 7512 KB Output is correct
84 Correct 2 ms 7772 KB Output is correct
85 Correct 1 ms 7772 KB Output is correct
86 Correct 1 ms 7772 KB Output is correct
87 Correct 1 ms 7600 KB Output is correct
88 Correct 2 ms 7772 KB Output is correct
89 Correct 1 ms 7772 KB Output is correct
90 Correct 1 ms 11100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6488 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 7004 KB Output is correct
4 Correct 6 ms 12636 KB Output is correct
5 Correct 6 ms 12636 KB Output is correct
6 Correct 1 ms 7516 KB Output is correct
7 Correct 6 ms 12476 KB Output is correct
8 Correct 6 ms 12636 KB Output is correct
9 Correct 2 ms 11356 KB Output is correct
10 Correct 5 ms 12636 KB Output is correct
11 Correct 4 ms 12636 KB Output is correct
12 Correct 2 ms 13916 KB Output is correct
13 Correct 5 ms 15192 KB Output is correct
14 Correct 4 ms 17244 KB Output is correct
15 Correct 7 ms 12380 KB Output is correct
16 Correct 6 ms 12396 KB Output is correct
17 Correct 7 ms 12380 KB Output is correct
18 Correct 6 ms 12644 KB Output is correct
19 Correct 6 ms 12636 KB Output is correct
20 Correct 7 ms 12636 KB Output is correct
21 Correct 7 ms 12636 KB Output is correct
22 Correct 7 ms 12632 KB Output is correct
23 Correct 6 ms 12636 KB Output is correct
24 Correct 6 ms 12696 KB Output is correct
25 Correct 7 ms 12636 KB Output is correct
26 Correct 6 ms 12636 KB Output is correct
27 Correct 7 ms 12636 KB Output is correct
28 Correct 6 ms 12480 KB Output is correct
29 Correct 6 ms 12636 KB Output is correct
30 Correct 6 ms 12380 KB Output is correct
31 Correct 6 ms 12532 KB Output is correct
32 Correct 7 ms 12464 KB Output is correct
33 Correct 5 ms 12220 KB Output is correct
34 Correct 5 ms 12220 KB Output is correct
35 Correct 6 ms 12380 KB Output is correct
36 Correct 4 ms 12380 KB Output is correct
37 Correct 5 ms 12380 KB Output is correct
38 Correct 4 ms 12380 KB Output is correct
39 Correct 5 ms 12380 KB Output is correct
40 Correct 5 ms 12380 KB Output is correct
41 Correct 4 ms 12380 KB Output is correct
42 Correct 7 ms 12636 KB Output is correct
43 Correct 7 ms 12636 KB Output is correct
44 Correct 7 ms 12636 KB Output is correct
45 Correct 7 ms 12636 KB Output is correct
46 Correct 3 ms 14428 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6488 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6748 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 7260 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7260 KB Output is correct
8 Correct 1 ms 7260 KB Output is correct
9 Correct 1 ms 7088 KB Output is correct
10 Correct 1 ms 7260 KB Output is correct
11 Correct 1 ms 7092 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 11100 KB Output is correct
14 Correct 1 ms 11100 KB Output is correct
15 Correct 1 ms 7260 KB Output is correct
16 Correct 1 ms 7004 KB Output is correct
17 Correct 1 ms 7004 KB Output is correct
18 Correct 1 ms 7260 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7260 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 7260 KB Output is correct
23 Correct 1 ms 7260 KB Output is correct
24 Correct 1 ms 7260 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 7260 KB Output is correct
28 Correct 1 ms 7292 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 1 ms 7260 KB Output is correct
31 Correct 1 ms 7260 KB Output is correct
32 Correct 1 ms 7004 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 7260 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 1 ms 7004 KB Output is correct
38 Correct 1 ms 7260 KB Output is correct
39 Correct 1 ms 7004 KB Output is correct
40 Correct 1 ms 7260 KB Output is correct
41 Correct 1 ms 7256 KB Output is correct
42 Correct 1 ms 7260 KB Output is correct
43 Correct 1 ms 7260 KB Output is correct
44 Correct 1 ms 7256 KB Output is correct
45 Correct 1 ms 7260 KB Output is correct
46 Correct 1 ms 10844 KB Output is correct
47 Correct 1 ms 7004 KB Output is correct
48 Correct 1 ms 7772 KB Output is correct
49 Correct 1 ms 7772 KB Output is correct
50 Correct 1 ms 7772 KB Output is correct
51 Correct 1 ms 7772 KB Output is correct
52 Correct 2 ms 7772 KB Output is correct
53 Correct 1 ms 7260 KB Output is correct
54 Correct 1 ms 11356 KB Output is correct
55 Correct 1 ms 7772 KB Output is correct
56 Correct 2 ms 14684 KB Output is correct
57 Correct 1 ms 11460 KB Output is correct
58 Correct 1 ms 11100 KB Output is correct
59 Correct 1 ms 7772 KB Output is correct
60 Correct 1 ms 7772 KB Output is correct
61 Correct 1 ms 7516 KB Output is correct
62 Correct 1 ms 7772 KB Output is correct
63 Correct 2 ms 7772 KB Output is correct
64 Correct 1 ms 7772 KB Output is correct
65 Correct 2 ms 7772 KB Output is correct
66 Correct 2 ms 7772 KB Output is correct
67 Correct 2 ms 7772 KB Output is correct
68 Correct 1 ms 7716 KB Output is correct
69 Correct 2 ms 7772 KB Output is correct
70 Correct 1 ms 7772 KB Output is correct
71 Correct 2 ms 7772 KB Output is correct
72 Correct 1 ms 7772 KB Output is correct
73 Correct 1 ms 7772 KB Output is correct
74 Correct 2 ms 7772 KB Output is correct
75 Correct 1 ms 7516 KB Output is correct
76 Correct 1 ms 7772 KB Output is correct
77 Correct 1 ms 7772 KB Output is correct
78 Correct 1 ms 7772 KB Output is correct
79 Correct 2 ms 7772 KB Output is correct
80 Correct 1 ms 7772 KB Output is correct
81 Correct 1 ms 7516 KB Output is correct
82 Correct 1 ms 7768 KB Output is correct
83 Correct 1 ms 7512 KB Output is correct
84 Correct 2 ms 7772 KB Output is correct
85 Correct 1 ms 7772 KB Output is correct
86 Correct 1 ms 7772 KB Output is correct
87 Correct 1 ms 7600 KB Output is correct
88 Correct 2 ms 7772 KB Output is correct
89 Correct 1 ms 7772 KB Output is correct
90 Correct 1 ms 11100 KB Output is correct
91 Correct 1 ms 7004 KB Output is correct
92 Correct 6 ms 12636 KB Output is correct
93 Correct 6 ms 12636 KB Output is correct
94 Correct 1 ms 7516 KB Output is correct
95 Correct 6 ms 12476 KB Output is correct
96 Correct 6 ms 12636 KB Output is correct
97 Correct 2 ms 11356 KB Output is correct
98 Correct 5 ms 12636 KB Output is correct
99 Correct 4 ms 12636 KB Output is correct
100 Correct 2 ms 13916 KB Output is correct
101 Correct 5 ms 15192 KB Output is correct
102 Correct 4 ms 17244 KB Output is correct
103 Correct 7 ms 12380 KB Output is correct
104 Correct 6 ms 12396 KB Output is correct
105 Correct 7 ms 12380 KB Output is correct
106 Correct 6 ms 12644 KB Output is correct
107 Correct 6 ms 12636 KB Output is correct
108 Correct 7 ms 12636 KB Output is correct
109 Correct 7 ms 12636 KB Output is correct
110 Correct 7 ms 12632 KB Output is correct
111 Correct 6 ms 12636 KB Output is correct
112 Correct 6 ms 12696 KB Output is correct
113 Correct 7 ms 12636 KB Output is correct
114 Correct 6 ms 12636 KB Output is correct
115 Correct 7 ms 12636 KB Output is correct
116 Correct 6 ms 12480 KB Output is correct
117 Correct 6 ms 12636 KB Output is correct
118 Correct 6 ms 12380 KB Output is correct
119 Correct 6 ms 12532 KB Output is correct
120 Correct 7 ms 12464 KB Output is correct
121 Correct 5 ms 12220 KB Output is correct
122 Correct 5 ms 12220 KB Output is correct
123 Correct 6 ms 12380 KB Output is correct
124 Correct 4 ms 12380 KB Output is correct
125 Correct 5 ms 12380 KB Output is correct
126 Correct 4 ms 12380 KB Output is correct
127 Correct 5 ms 12380 KB Output is correct
128 Correct 5 ms 12380 KB Output is correct
129 Correct 4 ms 12380 KB Output is correct
130 Correct 7 ms 12636 KB Output is correct
131 Correct 7 ms 12636 KB Output is correct
132 Correct 7 ms 12636 KB Output is correct
133 Correct 7 ms 12636 KB Output is correct
134 Correct 3 ms 14428 KB Output is correct
135 Correct 3 ms 11100 KB Output is correct
136 Correct 5 ms 13660 KB Output is correct
137 Correct 6 ms 13660 KB Output is correct
138 Correct 3 ms 10588 KB Output is correct
139 Correct 6 ms 13656 KB Output is correct
140 Correct 6 ms 13660 KB Output is correct
141 Correct 3 ms 12636 KB Output is correct
142 Correct 6 ms 13660 KB Output is correct
143 Correct 5 ms 16220 KB Output is correct
144 Correct 1 ms 8796 KB Output is correct
145 Correct 5 ms 14940 KB Output is correct
146 Correct 6 ms 15196 KB Output is correct
147 Correct 8 ms 13404 KB Output is correct
148 Correct 8 ms 13404 KB Output is correct
149 Correct 8 ms 13148 KB Output is correct
150 Correct 8 ms 13660 KB Output is correct
151 Correct 9 ms 13660 KB Output is correct
152 Correct 9 ms 13656 KB Output is correct
153 Correct 9 ms 13660 KB Output is correct
154 Correct 8 ms 13756 KB Output is correct
155 Correct 8 ms 13660 KB Output is correct
156 Correct 9 ms 13660 KB Output is correct
157 Correct 8 ms 13660 KB Output is correct
158 Correct 9 ms 13656 KB Output is correct
159 Correct 9 ms 13660 KB Output is correct
160 Correct 9 ms 13748 KB Output is correct
161 Correct 9 ms 13656 KB Output is correct
162 Correct 8 ms 13404 KB Output is correct
163 Correct 7 ms 13404 KB Output is correct
164 Correct 8 ms 13660 KB Output is correct
165 Correct 7 ms 13148 KB Output is correct
166 Correct 8 ms 13404 KB Output is correct
167 Correct 9 ms 13148 KB Output is correct
168 Correct 6 ms 13404 KB Output is correct
169 Correct 6 ms 13404 KB Output is correct
170 Correct 6 ms 13660 KB Output is correct
171 Correct 6 ms 13404 KB Output is correct
172 Correct 6 ms 13244 KB Output is correct
173 Correct 7 ms 13404 KB Output is correct
174 Correct 8 ms 13756 KB Output is correct
175 Correct 10 ms 13656 KB Output is correct
176 Correct 9 ms 13660 KB Output is correct
177 Correct 10 ms 13656 KB Output is correct
178 Correct 4 ms 14684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 6488 KB Output is correct
2 Correct 1 ms 6492 KB Output is correct
3 Correct 1 ms 6748 KB Output is correct
4 Correct 1 ms 7260 KB Output is correct
5 Correct 1 ms 7260 KB Output is correct
6 Correct 1 ms 7004 KB Output is correct
7 Correct 1 ms 7260 KB Output is correct
8 Correct 1 ms 7260 KB Output is correct
9 Correct 1 ms 7088 KB Output is correct
10 Correct 1 ms 7260 KB Output is correct
11 Correct 1 ms 7092 KB Output is correct
12 Correct 1 ms 6492 KB Output is correct
13 Correct 1 ms 11100 KB Output is correct
14 Correct 1 ms 11100 KB Output is correct
15 Correct 1 ms 7260 KB Output is correct
16 Correct 1 ms 7004 KB Output is correct
17 Correct 1 ms 7004 KB Output is correct
18 Correct 1 ms 7260 KB Output is correct
19 Correct 1 ms 7260 KB Output is correct
20 Correct 1 ms 7260 KB Output is correct
21 Correct 1 ms 7260 KB Output is correct
22 Correct 1 ms 7260 KB Output is correct
23 Correct 1 ms 7260 KB Output is correct
24 Correct 1 ms 7260 KB Output is correct
25 Correct 1 ms 7260 KB Output is correct
26 Correct 1 ms 7260 KB Output is correct
27 Correct 1 ms 7260 KB Output is correct
28 Correct 1 ms 7292 KB Output is correct
29 Correct 1 ms 7260 KB Output is correct
30 Correct 1 ms 7260 KB Output is correct
31 Correct 1 ms 7260 KB Output is correct
32 Correct 1 ms 7004 KB Output is correct
33 Correct 1 ms 7260 KB Output is correct
34 Correct 1 ms 7260 KB Output is correct
35 Correct 1 ms 7260 KB Output is correct
36 Correct 1 ms 7260 KB Output is correct
37 Correct 1 ms 7004 KB Output is correct
38 Correct 1 ms 7260 KB Output is correct
39 Correct 1 ms 7004 KB Output is correct
40 Correct 1 ms 7260 KB Output is correct
41 Correct 1 ms 7256 KB Output is correct
42 Correct 1 ms 7260 KB Output is correct
43 Correct 1 ms 7260 KB Output is correct
44 Correct 1 ms 7256 KB Output is correct
45 Correct 1 ms 7260 KB Output is correct
46 Correct 1 ms 10844 KB Output is correct
47 Correct 1 ms 7004 KB Output is correct
48 Correct 1 ms 7772 KB Output is correct
49 Correct 1 ms 7772 KB Output is correct
50 Correct 1 ms 7772 KB Output is correct
51 Correct 1 ms 7772 KB Output is correct
52 Correct 2 ms 7772 KB Output is correct
53 Correct 1 ms 7260 KB Output is correct
54 Correct 1 ms 11356 KB Output is correct
55 Correct 1 ms 7772 KB Output is correct
56 Correct 2 ms 14684 KB Output is correct
57 Correct 1 ms 11460 KB Output is correct
58 Correct 1 ms 11100 KB Output is correct
59 Correct 1 ms 7772 KB Output is correct
60 Correct 1 ms 7772 KB Output is correct
61 Correct 1 ms 7516 KB Output is correct
62 Correct 1 ms 7772 KB Output is correct
63 Correct 2 ms 7772 KB Output is correct
64 Correct 1 ms 7772 KB Output is correct
65 Correct 2 ms 7772 KB Output is correct
66 Correct 2 ms 7772 KB Output is correct
67 Correct 2 ms 7772 KB Output is correct
68 Correct 1 ms 7716 KB Output is correct
69 Correct 2 ms 7772 KB Output is correct
70 Correct 1 ms 7772 KB Output is correct
71 Correct 2 ms 7772 KB Output is correct
72 Correct 1 ms 7772 KB Output is correct
73 Correct 1 ms 7772 KB Output is correct
74 Correct 2 ms 7772 KB Output is correct
75 Correct 1 ms 7516 KB Output is correct
76 Correct 1 ms 7772 KB Output is correct
77 Correct 1 ms 7772 KB Output is correct
78 Correct 1 ms 7772 KB Output is correct
79 Correct 2 ms 7772 KB Output is correct
80 Correct 1 ms 7772 KB Output is correct
81 Correct 1 ms 7516 KB Output is correct
82 Correct 1 ms 7768 KB Output is correct
83 Correct 1 ms 7512 KB Output is correct
84 Correct 2 ms 7772 KB Output is correct
85 Correct 1 ms 7772 KB Output is correct
86 Correct 1 ms 7772 KB Output is correct
87 Correct 1 ms 7600 KB Output is correct
88 Correct 2 ms 7772 KB Output is correct
89 Correct 1 ms 7772 KB Output is correct
90 Correct 1 ms 11100 KB Output is correct
91 Correct 1 ms 7004 KB Output is correct
92 Correct 6 ms 12636 KB Output is correct
93 Correct 6 ms 12636 KB Output is correct
94 Correct 1 ms 7516 KB Output is correct
95 Correct 6 ms 12476 KB Output is correct
96 Correct 6 ms 12636 KB Output is correct
97 Correct 2 ms 11356 KB Output is correct
98 Correct 5 ms 12636 KB Output is correct
99 Correct 4 ms 12636 KB Output is correct
100 Correct 2 ms 13916 KB Output is correct
101 Correct 5 ms 15192 KB Output is correct
102 Correct 4 ms 17244 KB Output is correct
103 Correct 7 ms 12380 KB Output is correct
104 Correct 6 ms 12396 KB Output is correct
105 Correct 7 ms 12380 KB Output is correct
106 Correct 6 ms 12644 KB Output is correct
107 Correct 6 ms 12636 KB Output is correct
108 Correct 7 ms 12636 KB Output is correct
109 Correct 7 ms 12636 KB Output is correct
110 Correct 7 ms 12632 KB Output is correct
111 Correct 6 ms 12636 KB Output is correct
112 Correct 6 ms 12696 KB Output is correct
113 Correct 7 ms 12636 KB Output is correct
114 Correct 6 ms 12636 KB Output is correct
115 Correct 7 ms 12636 KB Output is correct
116 Correct 6 ms 12480 KB Output is correct
117 Correct 6 ms 12636 KB Output is correct
118 Correct 6 ms 12380 KB Output is correct
119 Correct 6 ms 12532 KB Output is correct
120 Correct 7 ms 12464 KB Output is correct
121 Correct 5 ms 12220 KB Output is correct
122 Correct 5 ms 12220 KB Output is correct
123 Correct 6 ms 12380 KB Output is correct
124 Correct 4 ms 12380 KB Output is correct
125 Correct 5 ms 12380 KB Output is correct
126 Correct 4 ms 12380 KB Output is correct
127 Correct 5 ms 12380 KB Output is correct
128 Correct 5 ms 12380 KB Output is correct
129 Correct 4 ms 12380 KB Output is correct
130 Correct 7 ms 12636 KB Output is correct
131 Correct 7 ms 12636 KB Output is correct
132 Correct 7 ms 12636 KB Output is correct
133 Correct 7 ms 12636 KB Output is correct
134 Correct 3 ms 14428 KB Output is correct
135 Correct 3 ms 11100 KB Output is correct
136 Correct 5 ms 13660 KB Output is correct
137 Correct 6 ms 13660 KB Output is correct
138 Correct 3 ms 10588 KB Output is correct
139 Correct 6 ms 13656 KB Output is correct
140 Correct 6 ms 13660 KB Output is correct
141 Correct 3 ms 12636 KB Output is correct
142 Correct 6 ms 13660 KB Output is correct
143 Correct 5 ms 16220 KB Output is correct
144 Correct 1 ms 8796 KB Output is correct
145 Correct 5 ms 14940 KB Output is correct
146 Correct 6 ms 15196 KB Output is correct
147 Correct 8 ms 13404 KB Output is correct
148 Correct 8 ms 13404 KB Output is correct
149 Correct 8 ms 13148 KB Output is correct
150 Correct 8 ms 13660 KB Output is correct
151 Correct 9 ms 13660 KB Output is correct
152 Correct 9 ms 13656 KB Output is correct
153 Correct 9 ms 13660 KB Output is correct
154 Correct 8 ms 13756 KB Output is correct
155 Correct 8 ms 13660 KB Output is correct
156 Correct 9 ms 13660 KB Output is correct
157 Correct 8 ms 13660 KB Output is correct
158 Correct 9 ms 13656 KB Output is correct
159 Correct 9 ms 13660 KB Output is correct
160 Correct 9 ms 13748 KB Output is correct
161 Correct 9 ms 13656 KB Output is correct
162 Correct 8 ms 13404 KB Output is correct
163 Correct 7 ms 13404 KB Output is correct
164 Correct 8 ms 13660 KB Output is correct
165 Correct 7 ms 13148 KB Output is correct
166 Correct 8 ms 13404 KB Output is correct
167 Correct 9 ms 13148 KB Output is correct
168 Correct 6 ms 13404 KB Output is correct
169 Correct 6 ms 13404 KB Output is correct
170 Correct 6 ms 13660 KB Output is correct
171 Correct 6 ms 13404 KB Output is correct
172 Correct 6 ms 13244 KB Output is correct
173 Correct 7 ms 13404 KB Output is correct
174 Correct 8 ms 13756 KB Output is correct
175 Correct 10 ms 13656 KB Output is correct
176 Correct 9 ms 13660 KB Output is correct
177 Correct 10 ms 13656 KB Output is correct
178 Correct 4 ms 14684 KB Output is correct
179 Correct 18 ms 27072 KB Output is correct
180 Correct 61 ms 40460 KB Output is correct
181 Correct 60 ms 40272 KB Output is correct
182 Correct 20 ms 29624 KB Output is correct
183 Correct 62 ms 40452 KB Output is correct
184 Correct 60 ms 40372 KB Output is correct
185 Correct 50 ms 36692 KB Output is correct
186 Correct 62 ms 40356 KB Output is correct
187 Correct 63 ms 40272 KB Output is correct
188 Correct 39 ms 35132 KB Output is correct
189 Correct 70 ms 40532 KB Output is correct
190 Correct 70 ms 40528 KB Output is correct
191 Correct 111 ms 37540 KB Output is correct
192 Correct 126 ms 39860 KB Output is correct
193 Correct 112 ms 37972 KB Output is correct
194 Correct 120 ms 40252 KB Output is correct
195 Correct 119 ms 40364 KB Output is correct
196 Correct 121 ms 40272 KB Output is correct
197 Correct 118 ms 40272 KB Output is correct
198 Correct 129 ms 40276 KB Output is correct
199 Correct 121 ms 40276 KB Output is correct
200 Correct 121 ms 40276 KB Output is correct
201 Correct 121 ms 40368 KB Output is correct
202 Correct 147 ms 40372 KB Output is correct
203 Correct 125 ms 40272 KB Output is correct
204 Correct 120 ms 40272 KB Output is correct
205 Correct 121 ms 40272 KB Output is correct
206 Correct 107 ms 39304 KB Output is correct
207 Correct 117 ms 38736 KB Output is correct
208 Correct 102 ms 38236 KB Output is correct
209 Correct 107 ms 39340 KB Output is correct
210 Correct 112 ms 38480 KB Output is correct
211 Correct 112 ms 39508 KB Output is correct
212 Correct 53 ms 37456 KB Output is correct
213 Correct 70 ms 38652 KB Output is correct
214 Correct 66 ms 37460 KB Output is correct
215 Correct 75 ms 38992 KB Output is correct
216 Correct 67 ms 37520 KB Output is correct
217 Correct 72 ms 38224 KB Output is correct
218 Correct 126 ms 40272 KB Output is correct
219 Correct 139 ms 40276 KB Output is correct
220 Correct 134 ms 40288 KB Output is correct
221 Correct 129 ms 40376 KB Output is correct
222 Correct 55 ms 38480 KB Output is correct