Submission #1047984

# Submission time Handle Problem Language Result Execution time Memory
1047984 2024-08-07T19:27:41 Z PurpleCrayon Toy (CEOI24_toy) C++17
73 / 100
1500 ms 46932 KB
#include <bits/stdc++.h>
using namespace std;
 
#define sz(v) int(v.size())
#define ar array
typedef long long ll;
const int N = 1.5e3+10, MOD = 1e9+7;
const int INF = 2e9+10;

vector<vector<int>> can_square(vector<vector<int>> g, int a, int b) {
    int n = sz(g), m = sz(g[0]);
    vector<vector<int>> can(n, vector<int>(m));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            if (!g[i][j]) continue;

            int ra = 1;
            for (int k = j-1; k >= 0; k--) {
                if (!g[i][k]) break;
                ra++;
            }
            for (int k = j+1; k < m; k++) {
                if (!g[i][k]) break;
                ra++;
            }

            int rb = 1;
            for (int k = i-1; k >= 0; k--) {
                if (!g[k][j]) break;
                rb++;
            }
            for (int k = i+1; k < n; k++) {
                if (!g[k][j]) break;
                rb++;
            }

            if (ra >= a && rb >= b) {
                can[i][j] = 1;
            }
        }
    }

    return can;
}
 
int n, m, a, b;
bool vis[N][N];

void dfs(int i, int j, const auto& one, const auto& two, const auto& can) {
    vis[i][j] = 1;
    if (i < n-1 && !vis[i+1][j] && can[i+1][j] && one[i][j]) {
        dfs(i+1, j, one, two, can);
    }
    if (j < m-1 && !vis[i][j+1] && can[i][j+1] && two[i][j]) {
        dfs(i, j+1, one, two, can);
    }
    if (i > 0 && !vis[i-1][j] && can[i-1][j] && one[i-1][j]) {
        dfs(i-1, j, one, two, can);
    }
    if (j > 0 && !vis[i][j-1] && can[i][j-1] && two[i][j-1]) {
        dfs(i, j-1, one, two, can);
    }
}

void solve() {
    cin >> m >> n >> a >> b;
    int trash, si, sj; cin >> trash >> si >> sj >> trash;

    vector<vector<int>> g(n, vector<int>(m));

    int ei = -1, ej = -1;
    for (int i = 0; i < n; i++) {
        string s; cin >> s;
        for (int j = 0; j < m; j++) {
            if (s[j] == 'X') g[i][j] = 0;
            else {
                g[i][j] = 1;
                if (s[j] == '*')
                    ei = i, ej = j;
            }
        }
    }

    vector<vector<int>> g1(n-1, vector<int>(m));
    vector<vector<int>> g2(n, vector<int>(m-1));
    for (int i = 0; i < n-1; i++) {
        for (int j = 0; j < m; j++) {
            g1[i][j] = g[i][j] & g[i+1][j];
        }
    }

    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m-1; j++) {
            g2[i][j] = g[i][j] & g[i][j+1];
        }
    }

    auto one = can_square(g1, a, b-1), two = can_square(g2, a-1, b);
    auto can = can_square(g, a, b);
    if (!can[si][sj] || !can[ei][ej]) {
        cout << "NO\n";
        return;
    }

    dfs(si, sj, one, two, can);

    cout << (vis[ei][ej] ? "YES\n" : "NO\n");
}
 
int main() {
    ios::sync_with_stdio(false); cin.tie(0);
    int T = 1;
    // cin >> T;
    while (T--) solve();
}

Compilation message

Main.cpp:49:30: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   49 | void dfs(int i, int j, const auto& one, const auto& two, const auto& can) {
      |                              ^~~~
Main.cpp:49:47: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   49 | void dfs(int i, int j, const auto& one, const auto& two, const auto& can) {
      |                                               ^~~~
Main.cpp:49:64: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   49 | void dfs(int i, int j, const auto& one, const auto& two, const auto& can) {
      |                                                                ^~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 860 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 860 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 860 KB Output is correct
18 Correct 1 ms 860 KB Output is correct
19 Correct 1 ms 860 KB Output is correct
20 Correct 1 ms 860 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 860 KB Output is correct
25 Correct 1 ms 860 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 860 KB Output is correct
29 Correct 1 ms 860 KB Output is correct
30 Correct 1 ms 860 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 1 ms 860 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 860 KB Output is correct
35 Correct 1 ms 860 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 1 ms 604 KB Output is correct
39 Correct 1 ms 604 KB Output is correct
40 Correct 1 ms 604 KB Output is correct
41 Correct 0 ms 604 KB Output is correct
42 Correct 1 ms 716 KB Output is correct
43 Correct 1 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 860 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 860 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 860 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 860 KB Output is correct
18 Correct 1 ms 860 KB Output is correct
19 Correct 1 ms 860 KB Output is correct
20 Correct 1 ms 860 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 860 KB Output is correct
25 Correct 1 ms 860 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 860 KB Output is correct
29 Correct 1 ms 860 KB Output is correct
30 Correct 1 ms 860 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 1 ms 860 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 860 KB Output is correct
35 Correct 1 ms 860 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 1 ms 604 KB Output is correct
39 Correct 1 ms 604 KB Output is correct
40 Correct 1 ms 604 KB Output is correct
41 Correct 0 ms 604 KB Output is correct
42 Correct 1 ms 716 KB Output is correct
43 Correct 1 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 860 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 1 ms 604 KB Output is correct
48 Correct 2 ms 720 KB Output is correct
49 Correct 2 ms 860 KB Output is correct
50 Correct 2 ms 604 KB Output is correct
51 Correct 2 ms 604 KB Output is correct
52 Correct 2 ms 604 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 2 ms 604 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 2 ms 1628 KB Output is correct
60 Correct 2 ms 1628 KB Output is correct
61 Correct 3 ms 1628 KB Output is correct
62 Correct 3 ms 1884 KB Output is correct
63 Correct 3 ms 1884 KB Output is correct
64 Correct 6 ms 1736 KB Output is correct
65 Correct 3 ms 1884 KB Output is correct
66 Correct 3 ms 1884 KB Output is correct
67 Correct 4 ms 1884 KB Output is correct
68 Correct 3 ms 1884 KB Output is correct
69 Correct 3 ms 1884 KB Output is correct
70 Correct 3 ms 1628 KB Output is correct
71 Correct 3 ms 1736 KB Output is correct
72 Correct 3 ms 1628 KB Output is correct
73 Correct 3 ms 1736 KB Output is correct
74 Correct 3 ms 1624 KB Output is correct
75 Correct 2 ms 696 KB Output is correct
76 Correct 3 ms 1884 KB Output is correct
77 Correct 2 ms 604 KB Output is correct
78 Correct 3 ms 1884 KB Output is correct
79 Correct 3 ms 1628 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 2 ms 860 KB Output is correct
82 Correct 2 ms 860 KB Output is correct
83 Correct 2 ms 908 KB Output is correct
84 Correct 2 ms 1116 KB Output is correct
85 Correct 2 ms 860 KB Output is correct
86 Correct 3 ms 1884 KB Output is correct
87 Correct 3 ms 1884 KB Output is correct
88 Correct 3 ms 1884 KB Output is correct
89 Correct 4 ms 1748 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 860 KB Output is correct
4 Correct 69 ms 17328 KB Output is correct
5 Correct 72 ms 16964 KB Output is correct
6 Correct 3 ms 2140 KB Output is correct
7 Correct 41 ms 14172 KB Output is correct
8 Correct 37 ms 14164 KB Output is correct
9 Correct 5 ms 1368 KB Output is correct
10 Correct 11 ms 2912 KB Output is correct
11 Correct 11 ms 2896 KB Output is correct
12 Correct 2 ms 1136 KB Output is correct
13 Correct 6 ms 2908 KB Output is correct
14 Correct 6 ms 2912 KB Output is correct
15 Correct 90 ms 16992 KB Output is correct
16 Correct 82 ms 14416 KB Output is correct
17 Correct 66 ms 16200 KB Output is correct
18 Correct 77 ms 15940 KB Output is correct
19 Correct 79 ms 15956 KB Output is correct
20 Correct 79 ms 15952 KB Output is correct
21 Correct 87 ms 15952 KB Output is correct
22 Correct 87 ms 15956 KB Output is correct
23 Correct 79 ms 16040 KB Output is correct
24 Correct 74 ms 15952 KB Output is correct
25 Correct 72 ms 15956 KB Output is correct
26 Correct 56 ms 11608 KB Output is correct
27 Correct 53 ms 11604 KB Output is correct
28 Correct 53 ms 11688 KB Output is correct
29 Correct 53 ms 11604 KB Output is correct
30 Correct 75 ms 15440 KB Output is correct
31 Correct 80 ms 2644 KB Output is correct
32 Correct 77 ms 15696 KB Output is correct
33 Correct 63 ms 2640 KB Output is correct
34 Correct 73 ms 14536 KB Output is correct
35 Correct 88 ms 14676 KB Output is correct
36 Correct 22 ms 4688 KB Output is correct
37 Correct 54 ms 7252 KB Output is correct
38 Correct 48 ms 6740 KB Output is correct
39 Correct 59 ms 6816 KB Output is correct
40 Correct 54 ms 7252 KB Output is correct
41 Correct 48 ms 6844 KB Output is correct
42 Correct 80 ms 15956 KB Output is correct
43 Correct 86 ms 17824 KB Output is correct
44 Correct 80 ms 15888 KB Output is correct
45 Correct 79 ms 15956 KB Output is correct
46 Correct 2 ms 2676 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 860 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 860 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 860 KB Output is correct
18 Correct 1 ms 860 KB Output is correct
19 Correct 1 ms 860 KB Output is correct
20 Correct 1 ms 860 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 860 KB Output is correct
25 Correct 1 ms 860 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 860 KB Output is correct
29 Correct 1 ms 860 KB Output is correct
30 Correct 1 ms 860 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 1 ms 860 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 860 KB Output is correct
35 Correct 1 ms 860 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 1 ms 604 KB Output is correct
39 Correct 1 ms 604 KB Output is correct
40 Correct 1 ms 604 KB Output is correct
41 Correct 0 ms 604 KB Output is correct
42 Correct 1 ms 716 KB Output is correct
43 Correct 1 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 860 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 1 ms 604 KB Output is correct
48 Correct 2 ms 720 KB Output is correct
49 Correct 2 ms 860 KB Output is correct
50 Correct 2 ms 604 KB Output is correct
51 Correct 2 ms 604 KB Output is correct
52 Correct 2 ms 604 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 2 ms 604 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 2 ms 1628 KB Output is correct
60 Correct 2 ms 1628 KB Output is correct
61 Correct 3 ms 1628 KB Output is correct
62 Correct 3 ms 1884 KB Output is correct
63 Correct 3 ms 1884 KB Output is correct
64 Correct 6 ms 1736 KB Output is correct
65 Correct 3 ms 1884 KB Output is correct
66 Correct 3 ms 1884 KB Output is correct
67 Correct 4 ms 1884 KB Output is correct
68 Correct 3 ms 1884 KB Output is correct
69 Correct 3 ms 1884 KB Output is correct
70 Correct 3 ms 1628 KB Output is correct
71 Correct 3 ms 1736 KB Output is correct
72 Correct 3 ms 1628 KB Output is correct
73 Correct 3 ms 1736 KB Output is correct
74 Correct 3 ms 1624 KB Output is correct
75 Correct 2 ms 696 KB Output is correct
76 Correct 3 ms 1884 KB Output is correct
77 Correct 2 ms 604 KB Output is correct
78 Correct 3 ms 1884 KB Output is correct
79 Correct 3 ms 1628 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 2 ms 860 KB Output is correct
82 Correct 2 ms 860 KB Output is correct
83 Correct 2 ms 908 KB Output is correct
84 Correct 2 ms 1116 KB Output is correct
85 Correct 2 ms 860 KB Output is correct
86 Correct 3 ms 1884 KB Output is correct
87 Correct 3 ms 1884 KB Output is correct
88 Correct 3 ms 1884 KB Output is correct
89 Correct 4 ms 1748 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 860 KB Output is correct
92 Correct 69 ms 17328 KB Output is correct
93 Correct 72 ms 16964 KB Output is correct
94 Correct 3 ms 2140 KB Output is correct
95 Correct 41 ms 14172 KB Output is correct
96 Correct 37 ms 14164 KB Output is correct
97 Correct 5 ms 1368 KB Output is correct
98 Correct 11 ms 2912 KB Output is correct
99 Correct 11 ms 2896 KB Output is correct
100 Correct 2 ms 1136 KB Output is correct
101 Correct 6 ms 2908 KB Output is correct
102 Correct 6 ms 2912 KB Output is correct
103 Correct 90 ms 16992 KB Output is correct
104 Correct 82 ms 14416 KB Output is correct
105 Correct 66 ms 16200 KB Output is correct
106 Correct 77 ms 15940 KB Output is correct
107 Correct 79 ms 15956 KB Output is correct
108 Correct 79 ms 15952 KB Output is correct
109 Correct 87 ms 15952 KB Output is correct
110 Correct 87 ms 15956 KB Output is correct
111 Correct 79 ms 16040 KB Output is correct
112 Correct 74 ms 15952 KB Output is correct
113 Correct 72 ms 15956 KB Output is correct
114 Correct 56 ms 11608 KB Output is correct
115 Correct 53 ms 11604 KB Output is correct
116 Correct 53 ms 11688 KB Output is correct
117 Correct 53 ms 11604 KB Output is correct
118 Correct 75 ms 15440 KB Output is correct
119 Correct 80 ms 2644 KB Output is correct
120 Correct 77 ms 15696 KB Output is correct
121 Correct 63 ms 2640 KB Output is correct
122 Correct 73 ms 14536 KB Output is correct
123 Correct 88 ms 14676 KB Output is correct
124 Correct 22 ms 4688 KB Output is correct
125 Correct 54 ms 7252 KB Output is correct
126 Correct 48 ms 6740 KB Output is correct
127 Correct 59 ms 6816 KB Output is correct
128 Correct 54 ms 7252 KB Output is correct
129 Correct 48 ms 6844 KB Output is correct
130 Correct 80 ms 15956 KB Output is correct
131 Correct 86 ms 17824 KB Output is correct
132 Correct 80 ms 15888 KB Output is correct
133 Correct 79 ms 15956 KB Output is correct
134 Correct 2 ms 2676 KB Output is correct
135 Correct 19 ms 1592 KB Output is correct
136 Correct 111 ms 6228 KB Output is correct
137 Correct 118 ms 4216 KB Output is correct
138 Correct 14 ms 1628 KB Output is correct
139 Correct 56 ms 6268 KB Output is correct
140 Correct 51 ms 4176 KB Output is correct
141 Correct 7 ms 1884 KB Output is correct
142 Correct 16 ms 4248 KB Output is correct
143 Correct 16 ms 4220 KB Output is correct
144 Correct 1 ms 604 KB Output is correct
145 Correct 7 ms 4188 KB Output is correct
146 Correct 7 ms 4232 KB Output is correct
147 Correct 123 ms 21580 KB Output is correct
148 Correct 130 ms 22868 KB Output is correct
149 Correct 109 ms 21328 KB Output is correct
150 Correct 142 ms 22920 KB Output is correct
151 Correct 140 ms 22864 KB Output is correct
152 Correct 140 ms 22868 KB Output is correct
153 Correct 140 ms 22896 KB Output is correct
154 Correct 139 ms 22908 KB Output is correct
155 Correct 140 ms 22900 KB Output is correct
156 Correct 128 ms 22904 KB Output is correct
157 Correct 132 ms 22868 KB Output is correct
158 Correct 106 ms 19572 KB Output is correct
159 Correct 106 ms 19536 KB Output is correct
160 Correct 110 ms 19320 KB Output is correct
161 Correct 105 ms 19284 KB Output is correct
162 Correct 139 ms 20880 KB Output is correct
163 Correct 124 ms 3668 KB Output is correct
164 Correct 142 ms 22040 KB Output is correct
165 Correct 124 ms 3664 KB Output is correct
166 Correct 128 ms 21700 KB Output is correct
167 Correct 115 ms 20736 KB Output is correct
168 Correct 46 ms 6008 KB Output is correct
169 Correct 88 ms 9808 KB Output is correct
170 Correct 89 ms 9940 KB Output is correct
171 Correct 95 ms 9556 KB Output is correct
172 Correct 75 ms 9044 KB Output is correct
173 Correct 90 ms 9812 KB Output is correct
174 Correct 144 ms 22904 KB Output is correct
175 Correct 142 ms 23124 KB Output is correct
176 Correct 140 ms 22844 KB Output is correct
177 Correct 140 ms 24436 KB Output is correct
178 Correct 3 ms 3672 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 604 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 860 KB Output is correct
5 Correct 1 ms 604 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct
14 Correct 1 ms 348 KB Output is correct
15 Correct 1 ms 860 KB Output is correct
16 Correct 1 ms 856 KB Output is correct
17 Correct 1 ms 860 KB Output is correct
18 Correct 1 ms 860 KB Output is correct
19 Correct 1 ms 860 KB Output is correct
20 Correct 1 ms 860 KB Output is correct
21 Correct 1 ms 860 KB Output is correct
22 Correct 1 ms 860 KB Output is correct
23 Correct 1 ms 860 KB Output is correct
24 Correct 1 ms 860 KB Output is correct
25 Correct 1 ms 860 KB Output is correct
26 Correct 1 ms 856 KB Output is correct
27 Correct 1 ms 856 KB Output is correct
28 Correct 1 ms 860 KB Output is correct
29 Correct 1 ms 860 KB Output is correct
30 Correct 1 ms 860 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 1 ms 860 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 860 KB Output is correct
35 Correct 1 ms 860 KB Output is correct
36 Correct 0 ms 348 KB Output is correct
37 Correct 1 ms 604 KB Output is correct
38 Correct 1 ms 604 KB Output is correct
39 Correct 1 ms 604 KB Output is correct
40 Correct 1 ms 604 KB Output is correct
41 Correct 0 ms 604 KB Output is correct
42 Correct 1 ms 716 KB Output is correct
43 Correct 1 ms 860 KB Output is correct
44 Correct 1 ms 860 KB Output is correct
45 Correct 1 ms 860 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 1 ms 604 KB Output is correct
48 Correct 2 ms 720 KB Output is correct
49 Correct 2 ms 860 KB Output is correct
50 Correct 2 ms 604 KB Output is correct
51 Correct 2 ms 604 KB Output is correct
52 Correct 2 ms 604 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 2 ms 604 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 1 ms 604 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 2 ms 1628 KB Output is correct
60 Correct 2 ms 1628 KB Output is correct
61 Correct 3 ms 1628 KB Output is correct
62 Correct 3 ms 1884 KB Output is correct
63 Correct 3 ms 1884 KB Output is correct
64 Correct 6 ms 1736 KB Output is correct
65 Correct 3 ms 1884 KB Output is correct
66 Correct 3 ms 1884 KB Output is correct
67 Correct 4 ms 1884 KB Output is correct
68 Correct 3 ms 1884 KB Output is correct
69 Correct 3 ms 1884 KB Output is correct
70 Correct 3 ms 1628 KB Output is correct
71 Correct 3 ms 1736 KB Output is correct
72 Correct 3 ms 1628 KB Output is correct
73 Correct 3 ms 1736 KB Output is correct
74 Correct 3 ms 1624 KB Output is correct
75 Correct 2 ms 696 KB Output is correct
76 Correct 3 ms 1884 KB Output is correct
77 Correct 2 ms 604 KB Output is correct
78 Correct 3 ms 1884 KB Output is correct
79 Correct 3 ms 1628 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 2 ms 860 KB Output is correct
82 Correct 2 ms 860 KB Output is correct
83 Correct 2 ms 908 KB Output is correct
84 Correct 2 ms 1116 KB Output is correct
85 Correct 2 ms 860 KB Output is correct
86 Correct 3 ms 1884 KB Output is correct
87 Correct 3 ms 1884 KB Output is correct
88 Correct 3 ms 1884 KB Output is correct
89 Correct 4 ms 1748 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 860 KB Output is correct
92 Correct 69 ms 17328 KB Output is correct
93 Correct 72 ms 16964 KB Output is correct
94 Correct 3 ms 2140 KB Output is correct
95 Correct 41 ms 14172 KB Output is correct
96 Correct 37 ms 14164 KB Output is correct
97 Correct 5 ms 1368 KB Output is correct
98 Correct 11 ms 2912 KB Output is correct
99 Correct 11 ms 2896 KB Output is correct
100 Correct 2 ms 1136 KB Output is correct
101 Correct 6 ms 2908 KB Output is correct
102 Correct 6 ms 2912 KB Output is correct
103 Correct 90 ms 16992 KB Output is correct
104 Correct 82 ms 14416 KB Output is correct
105 Correct 66 ms 16200 KB Output is correct
106 Correct 77 ms 15940 KB Output is correct
107 Correct 79 ms 15956 KB Output is correct
108 Correct 79 ms 15952 KB Output is correct
109 Correct 87 ms 15952 KB Output is correct
110 Correct 87 ms 15956 KB Output is correct
111 Correct 79 ms 16040 KB Output is correct
112 Correct 74 ms 15952 KB Output is correct
113 Correct 72 ms 15956 KB Output is correct
114 Correct 56 ms 11608 KB Output is correct
115 Correct 53 ms 11604 KB Output is correct
116 Correct 53 ms 11688 KB Output is correct
117 Correct 53 ms 11604 KB Output is correct
118 Correct 75 ms 15440 KB Output is correct
119 Correct 80 ms 2644 KB Output is correct
120 Correct 77 ms 15696 KB Output is correct
121 Correct 63 ms 2640 KB Output is correct
122 Correct 73 ms 14536 KB Output is correct
123 Correct 88 ms 14676 KB Output is correct
124 Correct 22 ms 4688 KB Output is correct
125 Correct 54 ms 7252 KB Output is correct
126 Correct 48 ms 6740 KB Output is correct
127 Correct 59 ms 6816 KB Output is correct
128 Correct 54 ms 7252 KB Output is correct
129 Correct 48 ms 6844 KB Output is correct
130 Correct 80 ms 15956 KB Output is correct
131 Correct 86 ms 17824 KB Output is correct
132 Correct 80 ms 15888 KB Output is correct
133 Correct 79 ms 15956 KB Output is correct
134 Correct 2 ms 2676 KB Output is correct
135 Correct 19 ms 1592 KB Output is correct
136 Correct 111 ms 6228 KB Output is correct
137 Correct 118 ms 4216 KB Output is correct
138 Correct 14 ms 1628 KB Output is correct
139 Correct 56 ms 6268 KB Output is correct
140 Correct 51 ms 4176 KB Output is correct
141 Correct 7 ms 1884 KB Output is correct
142 Correct 16 ms 4248 KB Output is correct
143 Correct 16 ms 4220 KB Output is correct
144 Correct 1 ms 604 KB Output is correct
145 Correct 7 ms 4188 KB Output is correct
146 Correct 7 ms 4232 KB Output is correct
147 Correct 123 ms 21580 KB Output is correct
148 Correct 130 ms 22868 KB Output is correct
149 Correct 109 ms 21328 KB Output is correct
150 Correct 142 ms 22920 KB Output is correct
151 Correct 140 ms 22864 KB Output is correct
152 Correct 140 ms 22868 KB Output is correct
153 Correct 140 ms 22896 KB Output is correct
154 Correct 139 ms 22908 KB Output is correct
155 Correct 140 ms 22900 KB Output is correct
156 Correct 128 ms 22904 KB Output is correct
157 Correct 132 ms 22868 KB Output is correct
158 Correct 106 ms 19572 KB Output is correct
159 Correct 106 ms 19536 KB Output is correct
160 Correct 110 ms 19320 KB Output is correct
161 Correct 105 ms 19284 KB Output is correct
162 Correct 139 ms 20880 KB Output is correct
163 Correct 124 ms 3668 KB Output is correct
164 Correct 142 ms 22040 KB Output is correct
165 Correct 124 ms 3664 KB Output is correct
166 Correct 128 ms 21700 KB Output is correct
167 Correct 115 ms 20736 KB Output is correct
168 Correct 46 ms 6008 KB Output is correct
169 Correct 88 ms 9808 KB Output is correct
170 Correct 89 ms 9940 KB Output is correct
171 Correct 95 ms 9556 KB Output is correct
172 Correct 75 ms 9044 KB Output is correct
173 Correct 90 ms 9812 KB Output is correct
174 Correct 144 ms 22904 KB Output is correct
175 Correct 142 ms 23124 KB Output is correct
176 Correct 140 ms 22844 KB Output is correct
177 Correct 140 ms 24436 KB Output is correct
178 Correct 3 ms 3672 KB Output is correct
179 Correct 1164 ms 19676 KB Output is correct
180 Execution timed out 1539 ms 46932 KB Time limit exceeded
181 Halted 0 ms 0 KB -