Submission #1069942

# Submission time Handle Problem Language Result Execution time Memory
1069942 2024-08-22T10:23:01 Z vjudge1 Toy (CEOI24_toy) C++17
100 / 100
242 ms 323408 KB
#include <bits/stdc++.h>
#define int long long

using namespace std;

const int MAX_N = 1500;

int k, l, h, w;

string grid[MAX_N];
bool intersect[MAX_N][MAX_N];
int up[MAX_N][MAX_N], down[MAX_N][MAX_N], lft[MAX_N][MAX_N], rght[MAX_N][MAX_N];

void func(int x, int y) {
    if(x+1 != h && grid[x+1][y] != 'X' && !intersect[x+1][y]) {
        int min_up = min(up[x+1][y], up[x][y]), min_down = min(down[x+1][y], down[x][y]), sum = min_up + min_down - 1;
        if(sum >= k) {
            intersect[x+1][y] = 1;
            func(x+1, y);
        }
    }
    if(x && grid[x-1][y] != 'X' && !intersect[x-1][y]) {
        int min_up = min(up[x-1][y], up[x][y]), min_down = min(down[x-1][y], down[x][y]), sum = min_up + min_down - 1;
        if(sum >= k) {
            intersect[x-1][y] = 1;
            func(x-1, y);
        }
    }
    if(y+1 != w && grid[x][y+1] != 'X' && !intersect[x][y+1]) {
        int min_left = min(lft[x][y+1], lft[x][y]), min_right = min(rght[x][y+1], rght[x][y]), sum = min_left + min_right - 1;
        if(sum >= l) {
            intersect[x][y+1] = 1;
            func(x, y+1);
        }
    }
    if(y && grid[x][y-1] != 'X' && !intersect[x][y-1]) {
        int min_left = min(lft[x][y-1], lft[x][y]), min_right = min(rght[x][y-1], rght[x][y]), sum = min_left + min_right - 1;
        if(sum >= l) {
            intersect[x][y-1] = 1;
            func(x, y-1);
        }
    }
}

void solve() {
   int x1, y1, x2, y2;
   cin >> w >> h >> k >> l >> x1 >> y1 >> x2 >> y2;
   int ex, ey;
   for(int i=0; i<h; ++i) {
        cin >> grid[i];
        for(int j=0; j<w; ++j) {
            if(grid[i][j] == '*') ex = i, ey = j;
        }
   }
   intersect[y1][x2] = 1;
   for(int i=0; i<h; ++i) {
        up[i][0] = (grid[i][0] == 'X' ? 0 : 1);
        down[i][w-1] = (grid[i][w-1] == 'X' ? 0 : 1);
        for(int j=1; j<w; ++j) up[i][j] = (grid[i][j] == 'X' ? 0 : up[i][j-1] + 1);
        for(int j=w-2; j>=0; --j) down[i][j] = (grid[i][j] == 'X' ? 0 : down[i][j+1] + 1);
   }
   for(int i=0; i<w; ++i) {
        lft[0][i] = (grid[0][i] == 'X' ? 0 : 1);
        rght[h-1][i] = (grid[h-1][i] == 'X' ? 0 : 1);
        for(int j=1; j<h; ++j) lft[j][i] = (grid[j][i] == 'X' ? 0 : lft[j-1][i] + 1);
        for(int j=h-2; j>=0; --j) rght[j][i] = (grid[j][i] == 'X' ? 0 : rght[j+1][i] + 1);
   }
   func(y1, x2);
   cout << (intersect[ex][ey] ? "YES" : "NO") << endl;
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    int t = 1;
    while(t--) solve();
}

Compilation message

Main.cpp: In function 'void solve()':
Main.cpp:69:29: warning: 'ex' may be used uninitialized in this function [-Wmaybe-uninitialized]
   69 |    cout << (intersect[ex][ey] ? "YES" : "NO") << endl;
      |             ~~~~~~~~~~~~~~~~^
Main.cpp:69:29: warning: 'ey' may be used uninitialized in this function [-Wmaybe-uninitialized]
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 10844 KB Output is correct
4 Correct 2 ms 10844 KB Output is correct
5 Correct 1 ms 10844 KB Output is correct
6 Correct 1 ms 10588 KB Output is correct
7 Correct 1 ms 10844 KB Output is correct
8 Correct 1 ms 10844 KB Output is correct
9 Correct 1 ms 10588 KB Output is correct
10 Correct 1 ms 10844 KB Output is correct
11 Correct 1 ms 10752 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 2 ms 10588 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10844 KB Output is correct
16 Correct 1 ms 10844 KB Output is correct
17 Correct 1 ms 10844 KB Output is correct
18 Correct 1 ms 11100 KB Output is correct
19 Correct 2 ms 11100 KB Output is correct
20 Correct 1 ms 11100 KB Output is correct
21 Correct 2 ms 11096 KB Output is correct
22 Correct 1 ms 11100 KB Output is correct
23 Correct 1 ms 11100 KB Output is correct
24 Correct 1 ms 11100 KB Output is correct
25 Correct 1 ms 11032 KB Output is correct
26 Correct 1 ms 10844 KB Output is correct
27 Correct 1 ms 10844 KB Output is correct
28 Correct 2 ms 10840 KB Output is correct
29 Correct 2 ms 10844 KB Output is correct
30 Correct 1 ms 10844 KB Output is correct
31 Correct 2 ms 11008 KB Output is correct
32 Correct 2 ms 10844 KB Output is correct
33 Correct 1 ms 11100 KB Output is correct
34 Correct 3 ms 10844 KB Output is correct
35 Correct 2 ms 10844 KB Output is correct
36 Correct 1 ms 10844 KB Output is correct
37 Correct 1 ms 10844 KB Output is correct
38 Correct 1 ms 10844 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 1 ms 10844 KB Output is correct
41 Correct 1 ms 10844 KB Output is correct
42 Correct 1 ms 11040 KB Output is correct
43 Correct 1 ms 10844 KB Output is correct
44 Correct 1 ms 10844 KB Output is correct
45 Correct 2 ms 10844 KB Output is correct
46 Correct 1 ms 10588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 10844 KB Output is correct
4 Correct 2 ms 10844 KB Output is correct
5 Correct 1 ms 10844 KB Output is correct
6 Correct 1 ms 10588 KB Output is correct
7 Correct 1 ms 10844 KB Output is correct
8 Correct 1 ms 10844 KB Output is correct
9 Correct 1 ms 10588 KB Output is correct
10 Correct 1 ms 10844 KB Output is correct
11 Correct 1 ms 10752 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 2 ms 10588 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10844 KB Output is correct
16 Correct 1 ms 10844 KB Output is correct
17 Correct 1 ms 10844 KB Output is correct
18 Correct 1 ms 11100 KB Output is correct
19 Correct 2 ms 11100 KB Output is correct
20 Correct 1 ms 11100 KB Output is correct
21 Correct 2 ms 11096 KB Output is correct
22 Correct 1 ms 11100 KB Output is correct
23 Correct 1 ms 11100 KB Output is correct
24 Correct 1 ms 11100 KB Output is correct
25 Correct 1 ms 11032 KB Output is correct
26 Correct 1 ms 10844 KB Output is correct
27 Correct 1 ms 10844 KB Output is correct
28 Correct 2 ms 10840 KB Output is correct
29 Correct 2 ms 10844 KB Output is correct
30 Correct 1 ms 10844 KB Output is correct
31 Correct 2 ms 11008 KB Output is correct
32 Correct 2 ms 10844 KB Output is correct
33 Correct 1 ms 11100 KB Output is correct
34 Correct 3 ms 10844 KB Output is correct
35 Correct 2 ms 10844 KB Output is correct
36 Correct 1 ms 10844 KB Output is correct
37 Correct 1 ms 10844 KB Output is correct
38 Correct 1 ms 10844 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 1 ms 10844 KB Output is correct
41 Correct 1 ms 10844 KB Output is correct
42 Correct 1 ms 11040 KB Output is correct
43 Correct 1 ms 10844 KB Output is correct
44 Correct 1 ms 10844 KB Output is correct
45 Correct 2 ms 10844 KB Output is correct
46 Correct 1 ms 10588 KB Output is correct
47 Correct 2 ms 10844 KB Output is correct
48 Correct 1 ms 14940 KB Output is correct
49 Correct 2 ms 14940 KB Output is correct
50 Correct 2 ms 14856 KB Output is correct
51 Correct 2 ms 14940 KB Output is correct
52 Correct 2 ms 14940 KB Output is correct
53 Correct 2 ms 10756 KB Output is correct
54 Correct 2 ms 14940 KB Output is correct
55 Correct 2 ms 14940 KB Output is correct
56 Correct 2 ms 14940 KB Output is correct
57 Correct 2 ms 14940 KB Output is correct
58 Correct 2 ms 14940 KB Output is correct
59 Correct 2 ms 13404 KB Output is correct
60 Correct 2 ms 13404 KB Output is correct
61 Correct 1 ms 13148 KB Output is correct
62 Correct 2 ms 15708 KB Output is correct
63 Correct 2 ms 15620 KB Output is correct
64 Correct 2 ms 15708 KB Output is correct
65 Correct 2 ms 15708 KB Output is correct
66 Correct 2 ms 15708 KB Output is correct
67 Correct 2 ms 15660 KB Output is correct
68 Correct 2 ms 15624 KB Output is correct
69 Correct 2 ms 15716 KB Output is correct
70 Correct 2 ms 15452 KB Output is correct
71 Correct 2 ms 15452 KB Output is correct
72 Correct 2 ms 15452 KB Output is correct
73 Correct 2 ms 15452 KB Output is correct
74 Correct 2 ms 13660 KB Output is correct
75 Correct 2 ms 13572 KB Output is correct
76 Correct 2 ms 15708 KB Output is correct
77 Correct 2 ms 15704 KB Output is correct
78 Correct 2 ms 15708 KB Output is correct
79 Correct 2 ms 13656 KB Output is correct
80 Correct 2 ms 12896 KB Output is correct
81 Correct 1 ms 12892 KB Output is correct
82 Correct 1 ms 13088 KB Output is correct
83 Correct 1 ms 12892 KB Output is correct
84 Correct 2 ms 13152 KB Output is correct
85 Correct 2 ms 13152 KB Output is correct
86 Correct 2 ms 15708 KB Output is correct
87 Correct 2 ms 15392 KB Output is correct
88 Correct 2 ms 15452 KB Output is correct
89 Correct 2 ms 15452 KB Output is correct
90 Correct 2 ms 14940 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 10844 KB Output is correct
4 Correct 8 ms 29532 KB Output is correct
5 Correct 6 ms 27228 KB Output is correct
6 Correct 2 ms 13404 KB Output is correct
7 Correct 7 ms 25692 KB Output is correct
8 Correct 7 ms 26716 KB Output is correct
9 Correct 2 ms 14936 KB Output is correct
10 Correct 3 ms 23156 KB Output is correct
11 Correct 3 ms 23132 KB Output is correct
12 Correct 2 ms 21084 KB Output is correct
13 Correct 4 ms 23252 KB Output is correct
14 Correct 4 ms 23132 KB Output is correct
15 Correct 8 ms 31656 KB Output is correct
16 Correct 8 ms 30572 KB Output is correct
17 Correct 8 ms 30556 KB Output is correct
18 Correct 9 ms 32984 KB Output is correct
19 Correct 11 ms 33116 KB Output is correct
20 Correct 10 ms 33112 KB Output is correct
21 Correct 10 ms 33116 KB Output is correct
22 Correct 11 ms 32908 KB Output is correct
23 Correct 8 ms 33112 KB Output is correct
24 Correct 10 ms 32856 KB Output is correct
25 Correct 11 ms 32860 KB Output is correct
26 Correct 8 ms 29276 KB Output is correct
27 Correct 8 ms 29276 KB Output is correct
28 Correct 7 ms 29276 KB Output is correct
29 Correct 8 ms 29276 KB Output is correct
30 Correct 12 ms 32616 KB Output is correct
31 Correct 9 ms 32344 KB Output is correct
32 Correct 12 ms 32860 KB Output is correct
33 Correct 9 ms 32092 KB Output is correct
34 Correct 9 ms 31844 KB Output is correct
35 Correct 9 ms 32092 KB Output is correct
36 Correct 3 ms 23384 KB Output is correct
37 Correct 5 ms 26204 KB Output is correct
38 Correct 4 ms 25948 KB Output is correct
39 Correct 4 ms 26204 KB Output is correct
40 Correct 5 ms 26204 KB Output is correct
41 Correct 4 ms 26204 KB Output is correct
42 Correct 8 ms 29788 KB Output is correct
43 Correct 7 ms 30296 KB Output is correct
44 Correct 6 ms 28764 KB Output is correct
45 Correct 9 ms 30812 KB Output is correct
46 Correct 3 ms 23132 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 10844 KB Output is correct
4 Correct 2 ms 10844 KB Output is correct
5 Correct 1 ms 10844 KB Output is correct
6 Correct 1 ms 10588 KB Output is correct
7 Correct 1 ms 10844 KB Output is correct
8 Correct 1 ms 10844 KB Output is correct
9 Correct 1 ms 10588 KB Output is correct
10 Correct 1 ms 10844 KB Output is correct
11 Correct 1 ms 10752 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 2 ms 10588 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10844 KB Output is correct
16 Correct 1 ms 10844 KB Output is correct
17 Correct 1 ms 10844 KB Output is correct
18 Correct 1 ms 11100 KB Output is correct
19 Correct 2 ms 11100 KB Output is correct
20 Correct 1 ms 11100 KB Output is correct
21 Correct 2 ms 11096 KB Output is correct
22 Correct 1 ms 11100 KB Output is correct
23 Correct 1 ms 11100 KB Output is correct
24 Correct 1 ms 11100 KB Output is correct
25 Correct 1 ms 11032 KB Output is correct
26 Correct 1 ms 10844 KB Output is correct
27 Correct 1 ms 10844 KB Output is correct
28 Correct 2 ms 10840 KB Output is correct
29 Correct 2 ms 10844 KB Output is correct
30 Correct 1 ms 10844 KB Output is correct
31 Correct 2 ms 11008 KB Output is correct
32 Correct 2 ms 10844 KB Output is correct
33 Correct 1 ms 11100 KB Output is correct
34 Correct 3 ms 10844 KB Output is correct
35 Correct 2 ms 10844 KB Output is correct
36 Correct 1 ms 10844 KB Output is correct
37 Correct 1 ms 10844 KB Output is correct
38 Correct 1 ms 10844 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 1 ms 10844 KB Output is correct
41 Correct 1 ms 10844 KB Output is correct
42 Correct 1 ms 11040 KB Output is correct
43 Correct 1 ms 10844 KB Output is correct
44 Correct 1 ms 10844 KB Output is correct
45 Correct 2 ms 10844 KB Output is correct
46 Correct 1 ms 10588 KB Output is correct
47 Correct 2 ms 10844 KB Output is correct
48 Correct 1 ms 14940 KB Output is correct
49 Correct 2 ms 14940 KB Output is correct
50 Correct 2 ms 14856 KB Output is correct
51 Correct 2 ms 14940 KB Output is correct
52 Correct 2 ms 14940 KB Output is correct
53 Correct 2 ms 10756 KB Output is correct
54 Correct 2 ms 14940 KB Output is correct
55 Correct 2 ms 14940 KB Output is correct
56 Correct 2 ms 14940 KB Output is correct
57 Correct 2 ms 14940 KB Output is correct
58 Correct 2 ms 14940 KB Output is correct
59 Correct 2 ms 13404 KB Output is correct
60 Correct 2 ms 13404 KB Output is correct
61 Correct 1 ms 13148 KB Output is correct
62 Correct 2 ms 15708 KB Output is correct
63 Correct 2 ms 15620 KB Output is correct
64 Correct 2 ms 15708 KB Output is correct
65 Correct 2 ms 15708 KB Output is correct
66 Correct 2 ms 15708 KB Output is correct
67 Correct 2 ms 15660 KB Output is correct
68 Correct 2 ms 15624 KB Output is correct
69 Correct 2 ms 15716 KB Output is correct
70 Correct 2 ms 15452 KB Output is correct
71 Correct 2 ms 15452 KB Output is correct
72 Correct 2 ms 15452 KB Output is correct
73 Correct 2 ms 15452 KB Output is correct
74 Correct 2 ms 13660 KB Output is correct
75 Correct 2 ms 13572 KB Output is correct
76 Correct 2 ms 15708 KB Output is correct
77 Correct 2 ms 15704 KB Output is correct
78 Correct 2 ms 15708 KB Output is correct
79 Correct 2 ms 13656 KB Output is correct
80 Correct 2 ms 12896 KB Output is correct
81 Correct 1 ms 12892 KB Output is correct
82 Correct 1 ms 13088 KB Output is correct
83 Correct 1 ms 12892 KB Output is correct
84 Correct 2 ms 13152 KB Output is correct
85 Correct 2 ms 13152 KB Output is correct
86 Correct 2 ms 15708 KB Output is correct
87 Correct 2 ms 15392 KB Output is correct
88 Correct 2 ms 15452 KB Output is correct
89 Correct 2 ms 15452 KB Output is correct
90 Correct 2 ms 14940 KB Output is correct
91 Correct 1 ms 10844 KB Output is correct
92 Correct 8 ms 29532 KB Output is correct
93 Correct 6 ms 27228 KB Output is correct
94 Correct 2 ms 13404 KB Output is correct
95 Correct 7 ms 25692 KB Output is correct
96 Correct 7 ms 26716 KB Output is correct
97 Correct 2 ms 14936 KB Output is correct
98 Correct 3 ms 23156 KB Output is correct
99 Correct 3 ms 23132 KB Output is correct
100 Correct 2 ms 21084 KB Output is correct
101 Correct 4 ms 23252 KB Output is correct
102 Correct 4 ms 23132 KB Output is correct
103 Correct 8 ms 31656 KB Output is correct
104 Correct 8 ms 30572 KB Output is correct
105 Correct 8 ms 30556 KB Output is correct
106 Correct 9 ms 32984 KB Output is correct
107 Correct 11 ms 33116 KB Output is correct
108 Correct 10 ms 33112 KB Output is correct
109 Correct 10 ms 33116 KB Output is correct
110 Correct 11 ms 32908 KB Output is correct
111 Correct 8 ms 33112 KB Output is correct
112 Correct 10 ms 32856 KB Output is correct
113 Correct 11 ms 32860 KB Output is correct
114 Correct 8 ms 29276 KB Output is correct
115 Correct 8 ms 29276 KB Output is correct
116 Correct 7 ms 29276 KB Output is correct
117 Correct 8 ms 29276 KB Output is correct
118 Correct 12 ms 32616 KB Output is correct
119 Correct 9 ms 32344 KB Output is correct
120 Correct 12 ms 32860 KB Output is correct
121 Correct 9 ms 32092 KB Output is correct
122 Correct 9 ms 31844 KB Output is correct
123 Correct 9 ms 32092 KB Output is correct
124 Correct 3 ms 23384 KB Output is correct
125 Correct 5 ms 26204 KB Output is correct
126 Correct 4 ms 25948 KB Output is correct
127 Correct 4 ms 26204 KB Output is correct
128 Correct 5 ms 26204 KB Output is correct
129 Correct 4 ms 26204 KB Output is correct
130 Correct 8 ms 29788 KB Output is correct
131 Correct 7 ms 30296 KB Output is correct
132 Correct 6 ms 28764 KB Output is correct
133 Correct 9 ms 30812 KB Output is correct
134 Correct 3 ms 23132 KB Output is correct
135 Correct 2 ms 19036 KB Output is correct
136 Correct 3 ms 25476 KB Output is correct
137 Correct 3 ms 25436 KB Output is correct
138 Correct 2 ms 16988 KB Output is correct
139 Correct 3 ms 25432 KB Output is correct
140 Correct 3 ms 25436 KB Output is correct
141 Correct 3 ms 25180 KB Output is correct
142 Correct 4 ms 25432 KB Output is correct
143 Correct 4 ms 25436 KB Output is correct
144 Correct 1 ms 10780 KB Output is correct
145 Correct 6 ms 25436 KB Output is correct
146 Correct 6 ms 25364 KB Output is correct
147 Correct 8 ms 32860 KB Output is correct
148 Correct 11 ms 33116 KB Output is correct
149 Correct 11 ms 33148 KB Output is correct
150 Correct 13 ms 39516 KB Output is correct
151 Correct 13 ms 39696 KB Output is correct
152 Correct 13 ms 39512 KB Output is correct
153 Correct 14 ms 39516 KB Output is correct
154 Correct 12 ms 39692 KB Output is correct
155 Correct 13 ms 39516 KB Output is correct
156 Correct 14 ms 39516 KB Output is correct
157 Correct 12 ms 39516 KB Output is correct
158 Correct 11 ms 34396 KB Output is correct
159 Correct 11 ms 34392 KB Output is correct
160 Correct 12 ms 34224 KB Output is correct
161 Correct 10 ms 34204 KB Output is correct
162 Correct 12 ms 38316 KB Output is correct
163 Correct 14 ms 37980 KB Output is correct
164 Correct 17 ms 39100 KB Output is correct
165 Correct 13 ms 35676 KB Output is correct
166 Correct 17 ms 38780 KB Output is correct
167 Correct 13 ms 36020 KB Output is correct
168 Correct 5 ms 25436 KB Output is correct
169 Correct 6 ms 29632 KB Output is correct
170 Correct 6 ms 29788 KB Output is correct
171 Correct 5 ms 27480 KB Output is correct
172 Correct 6 ms 27228 KB Output is correct
173 Correct 7 ms 29632 KB Output is correct
174 Correct 9 ms 33344 KB Output is correct
175 Correct 13 ms 37260 KB Output is correct
176 Correct 12 ms 36444 KB Output is correct
177 Correct 11 ms 32460 KB Output is correct
178 Correct 4 ms 25436 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 8536 KB Output is correct
2 Correct 1 ms 8540 KB Output is correct
3 Correct 1 ms 10844 KB Output is correct
4 Correct 2 ms 10844 KB Output is correct
5 Correct 1 ms 10844 KB Output is correct
6 Correct 1 ms 10588 KB Output is correct
7 Correct 1 ms 10844 KB Output is correct
8 Correct 1 ms 10844 KB Output is correct
9 Correct 1 ms 10588 KB Output is correct
10 Correct 1 ms 10844 KB Output is correct
11 Correct 1 ms 10752 KB Output is correct
12 Correct 1 ms 8540 KB Output is correct
13 Correct 2 ms 10588 KB Output is correct
14 Correct 1 ms 10588 KB Output is correct
15 Correct 1 ms 10844 KB Output is correct
16 Correct 1 ms 10844 KB Output is correct
17 Correct 1 ms 10844 KB Output is correct
18 Correct 1 ms 11100 KB Output is correct
19 Correct 2 ms 11100 KB Output is correct
20 Correct 1 ms 11100 KB Output is correct
21 Correct 2 ms 11096 KB Output is correct
22 Correct 1 ms 11100 KB Output is correct
23 Correct 1 ms 11100 KB Output is correct
24 Correct 1 ms 11100 KB Output is correct
25 Correct 1 ms 11032 KB Output is correct
26 Correct 1 ms 10844 KB Output is correct
27 Correct 1 ms 10844 KB Output is correct
28 Correct 2 ms 10840 KB Output is correct
29 Correct 2 ms 10844 KB Output is correct
30 Correct 1 ms 10844 KB Output is correct
31 Correct 2 ms 11008 KB Output is correct
32 Correct 2 ms 10844 KB Output is correct
33 Correct 1 ms 11100 KB Output is correct
34 Correct 3 ms 10844 KB Output is correct
35 Correct 2 ms 10844 KB Output is correct
36 Correct 1 ms 10844 KB Output is correct
37 Correct 1 ms 10844 KB Output is correct
38 Correct 1 ms 10844 KB Output is correct
39 Correct 1 ms 10840 KB Output is correct
40 Correct 1 ms 10844 KB Output is correct
41 Correct 1 ms 10844 KB Output is correct
42 Correct 1 ms 11040 KB Output is correct
43 Correct 1 ms 10844 KB Output is correct
44 Correct 1 ms 10844 KB Output is correct
45 Correct 2 ms 10844 KB Output is correct
46 Correct 1 ms 10588 KB Output is correct
47 Correct 2 ms 10844 KB Output is correct
48 Correct 1 ms 14940 KB Output is correct
49 Correct 2 ms 14940 KB Output is correct
50 Correct 2 ms 14856 KB Output is correct
51 Correct 2 ms 14940 KB Output is correct
52 Correct 2 ms 14940 KB Output is correct
53 Correct 2 ms 10756 KB Output is correct
54 Correct 2 ms 14940 KB Output is correct
55 Correct 2 ms 14940 KB Output is correct
56 Correct 2 ms 14940 KB Output is correct
57 Correct 2 ms 14940 KB Output is correct
58 Correct 2 ms 14940 KB Output is correct
59 Correct 2 ms 13404 KB Output is correct
60 Correct 2 ms 13404 KB Output is correct
61 Correct 1 ms 13148 KB Output is correct
62 Correct 2 ms 15708 KB Output is correct
63 Correct 2 ms 15620 KB Output is correct
64 Correct 2 ms 15708 KB Output is correct
65 Correct 2 ms 15708 KB Output is correct
66 Correct 2 ms 15708 KB Output is correct
67 Correct 2 ms 15660 KB Output is correct
68 Correct 2 ms 15624 KB Output is correct
69 Correct 2 ms 15716 KB Output is correct
70 Correct 2 ms 15452 KB Output is correct
71 Correct 2 ms 15452 KB Output is correct
72 Correct 2 ms 15452 KB Output is correct
73 Correct 2 ms 15452 KB Output is correct
74 Correct 2 ms 13660 KB Output is correct
75 Correct 2 ms 13572 KB Output is correct
76 Correct 2 ms 15708 KB Output is correct
77 Correct 2 ms 15704 KB Output is correct
78 Correct 2 ms 15708 KB Output is correct
79 Correct 2 ms 13656 KB Output is correct
80 Correct 2 ms 12896 KB Output is correct
81 Correct 1 ms 12892 KB Output is correct
82 Correct 1 ms 13088 KB Output is correct
83 Correct 1 ms 12892 KB Output is correct
84 Correct 2 ms 13152 KB Output is correct
85 Correct 2 ms 13152 KB Output is correct
86 Correct 2 ms 15708 KB Output is correct
87 Correct 2 ms 15392 KB Output is correct
88 Correct 2 ms 15452 KB Output is correct
89 Correct 2 ms 15452 KB Output is correct
90 Correct 2 ms 14940 KB Output is correct
91 Correct 1 ms 10844 KB Output is correct
92 Correct 8 ms 29532 KB Output is correct
93 Correct 6 ms 27228 KB Output is correct
94 Correct 2 ms 13404 KB Output is correct
95 Correct 7 ms 25692 KB Output is correct
96 Correct 7 ms 26716 KB Output is correct
97 Correct 2 ms 14936 KB Output is correct
98 Correct 3 ms 23156 KB Output is correct
99 Correct 3 ms 23132 KB Output is correct
100 Correct 2 ms 21084 KB Output is correct
101 Correct 4 ms 23252 KB Output is correct
102 Correct 4 ms 23132 KB Output is correct
103 Correct 8 ms 31656 KB Output is correct
104 Correct 8 ms 30572 KB Output is correct
105 Correct 8 ms 30556 KB Output is correct
106 Correct 9 ms 32984 KB Output is correct
107 Correct 11 ms 33116 KB Output is correct
108 Correct 10 ms 33112 KB Output is correct
109 Correct 10 ms 33116 KB Output is correct
110 Correct 11 ms 32908 KB Output is correct
111 Correct 8 ms 33112 KB Output is correct
112 Correct 10 ms 32856 KB Output is correct
113 Correct 11 ms 32860 KB Output is correct
114 Correct 8 ms 29276 KB Output is correct
115 Correct 8 ms 29276 KB Output is correct
116 Correct 7 ms 29276 KB Output is correct
117 Correct 8 ms 29276 KB Output is correct
118 Correct 12 ms 32616 KB Output is correct
119 Correct 9 ms 32344 KB Output is correct
120 Correct 12 ms 32860 KB Output is correct
121 Correct 9 ms 32092 KB Output is correct
122 Correct 9 ms 31844 KB Output is correct
123 Correct 9 ms 32092 KB Output is correct
124 Correct 3 ms 23384 KB Output is correct
125 Correct 5 ms 26204 KB Output is correct
126 Correct 4 ms 25948 KB Output is correct
127 Correct 4 ms 26204 KB Output is correct
128 Correct 5 ms 26204 KB Output is correct
129 Correct 4 ms 26204 KB Output is correct
130 Correct 8 ms 29788 KB Output is correct
131 Correct 7 ms 30296 KB Output is correct
132 Correct 6 ms 28764 KB Output is correct
133 Correct 9 ms 30812 KB Output is correct
134 Correct 3 ms 23132 KB Output is correct
135 Correct 2 ms 19036 KB Output is correct
136 Correct 3 ms 25476 KB Output is correct
137 Correct 3 ms 25436 KB Output is correct
138 Correct 2 ms 16988 KB Output is correct
139 Correct 3 ms 25432 KB Output is correct
140 Correct 3 ms 25436 KB Output is correct
141 Correct 3 ms 25180 KB Output is correct
142 Correct 4 ms 25432 KB Output is correct
143 Correct 4 ms 25436 KB Output is correct
144 Correct 1 ms 10780 KB Output is correct
145 Correct 6 ms 25436 KB Output is correct
146 Correct 6 ms 25364 KB Output is correct
147 Correct 8 ms 32860 KB Output is correct
148 Correct 11 ms 33116 KB Output is correct
149 Correct 11 ms 33148 KB Output is correct
150 Correct 13 ms 39516 KB Output is correct
151 Correct 13 ms 39696 KB Output is correct
152 Correct 13 ms 39512 KB Output is correct
153 Correct 14 ms 39516 KB Output is correct
154 Correct 12 ms 39692 KB Output is correct
155 Correct 13 ms 39516 KB Output is correct
156 Correct 14 ms 39516 KB Output is correct
157 Correct 12 ms 39516 KB Output is correct
158 Correct 11 ms 34396 KB Output is correct
159 Correct 11 ms 34392 KB Output is correct
160 Correct 12 ms 34224 KB Output is correct
161 Correct 10 ms 34204 KB Output is correct
162 Correct 12 ms 38316 KB Output is correct
163 Correct 14 ms 37980 KB Output is correct
164 Correct 17 ms 39100 KB Output is correct
165 Correct 13 ms 35676 KB Output is correct
166 Correct 17 ms 38780 KB Output is correct
167 Correct 13 ms 36020 KB Output is correct
168 Correct 5 ms 25436 KB Output is correct
169 Correct 6 ms 29632 KB Output is correct
170 Correct 6 ms 29788 KB Output is correct
171 Correct 5 ms 27480 KB Output is correct
172 Correct 6 ms 27228 KB Output is correct
173 Correct 7 ms 29632 KB Output is correct
174 Correct 9 ms 33344 KB Output is correct
175 Correct 13 ms 37260 KB Output is correct
176 Correct 12 ms 36444 KB Output is correct
177 Correct 11 ms 32460 KB Output is correct
178 Correct 4 ms 25436 KB Output is correct
179 Correct 9 ms 49240 KB Output is correct
180 Correct 27 ms 76056 KB Output is correct
181 Correct 26 ms 76116 KB Output is correct
182 Correct 9 ms 56920 KB Output is correct
183 Correct 25 ms 76116 KB Output is correct
184 Correct 27 ms 76112 KB Output is correct
185 Correct 31 ms 75088 KB Output is correct
186 Correct 36 ms 75984 KB Output is correct
187 Correct 31 ms 76136 KB Output is correct
188 Correct 37 ms 66128 KB Output is correct
189 Correct 58 ms 76592 KB Output is correct
190 Correct 55 ms 76116 KB Output is correct
191 Correct 149 ms 187640 KB Output is correct
192 Correct 155 ms 190700 KB Output is correct
193 Correct 158 ms 220960 KB Output is correct
194 Correct 212 ms 323324 KB Output is correct
195 Correct 222 ms 323408 KB Output is correct
196 Correct 227 ms 323120 KB Output is correct
197 Correct 218 ms 323152 KB Output is correct
198 Correct 234 ms 323332 KB Output is correct
199 Correct 218 ms 323240 KB Output is correct
200 Correct 226 ms 323156 KB Output is correct
201 Correct 242 ms 323120 KB Output is correct
202 Correct 181 ms 231520 KB Output is correct
203 Correct 190 ms 231504 KB Output is correct
204 Correct 181 ms 231252 KB Output is correct
205 Correct 181 ms 231008 KB Output is correct
206 Correct 203 ms 291156 KB Output is correct
207 Correct 181 ms 293224 KB Output is correct
208 Correct 178 ms 282452 KB Output is correct
209 Correct 204 ms 296788 KB Output is correct
210 Correct 190 ms 295760 KB Output is correct
211 Correct 197 ms 309592 KB Output is correct
212 Correct 27 ms 75792 KB Output is correct
213 Correct 80 ms 149844 KB Output is correct
214 Correct 70 ms 145772 KB Output is correct
215 Correct 77 ms 151120 KB Output is correct
216 Correct 68 ms 144304 KB Output is correct
217 Correct 71 ms 145492 KB Output is correct
218 Correct 177 ms 270496 KB Output is correct
219 Correct 183 ms 265300 KB Output is correct
220 Correct 172 ms 242488 KB Output is correct
221 Correct 177 ms 267232 KB Output is correct
222 Correct 23 ms 75604 KB Output is correct