Submission #1039687

# Submission time Handle Problem Language Result Execution time Memory
1039687 2024-07-31T07:36:26 Z 정민찬(#10992) Toy (CEOI24_toy) C++17
100 / 100
223 ms 67412 KB
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;

int a[1510][1510];
int r[1510][1510], d[1510][1510];
int dir[1510][1510][4];
int vis[1510][1510];

int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};

int main() {
    int W, H, K, L;
    scanf("%d %d %d %d", &W, &H, &K, &L);
    int sx, sy, t;
    scanf("%d %d", &t, &sy);
    scanf("%d %d", &sx, &t);
    swap(sx, sy);
    sx ++; sy ++;
    int ex, ey;
    for (int i=1; i<=H; i++) {
        for (int j=1; j<=W; j++) {
            char c;
            scanf(" %c", &c);
            if (c == 'X') a[i][j] = 1;
            else if (c == '*') {
                ex = i;
                ey = j;
            }
        }
    }
    for (int i=1; i<=H; i++) {
        for (int j=1; j<=W; j++) {
            r[i][j] = r[i][j-1] + a[i][j];
        }
    }
    for (int j=1; j<=W; j++) {
        for (int i=1; i<=H; i++) {
            d[i][j] = d[i-1][j] + a[i][j];
        }
    }
    for (int i=1; i<=H-1; i++) {
        int S[1510];
        memset(S, 0, sizeof(S));
        for (int j=1; j<=W-K+1; j++) {
            if (r[i][j+K-1] - r[i][j-1] == 0 && r[i+1][j+K-1] - r[i+1][j-1] == 0) {
                S[j] ++;
                S[j+K] --;
            }
        }
        for (int j=1; j<=W; j++) {
            S[j] += S[j-1];
            if (S[j]) {
                dir[i][j][2] = 1;
                //
            }
        }
    }
    for (int i=2; i<=H; i++) {
        int S[1510];
        memset(S, 0, sizeof(S));
        for (int j=1; j<=W-K+1; j++) {
            if (r[i][j+K-1] - r[i][j-1] == 0 && r[i-1][j+K-1] - r[i-1][j-1] == 0) {
                S[j] ++;
                S[j+K] --;
            }
        }
        for (int j=1; j<=W; j++) {
            S[j] += S[j-1];
            if (S[j]) {
                dir[i][j][3] = 1;
            }
        }
    }
    for (int j=1; j<=W-1; j++) {
        int S[1510];
        memset(S, 0, sizeof(S));
        for (int i=1; i<=H-L+1; i++) {
            if (d[i+L-1][j] - d[i-1][j] == 0 && d[i+L-1][j+1] - d[i-1][j+1] == 0) {
                S[i] ++;
                S[i+L] --;
            }
        }
        for (int i=1; i<=H; i++) {
            S[i] += S[i-1];
            if (S[i]) {
                dir[i][j][0] = 1;
            }
        }
    }
    for (int j=2; j<=W; j++) {
        int S[1510];
        memset(S, 0, sizeof(S));
        for (int i=1; i<=H-L+1; i++) {
            if (d[i+L-1][j] - d[i-1][j] == 0 && d[i+L-1][j-1] - d[i-1][j-1] == 0) {
                S[i] ++;
                S[i+L] --;
            }
        }
        for (int i=1; i<=H; i++) {
            S[i] += S[i-1];
            if (S[i]) {
                dir[i][j][1] = 1;
            }
        }
    }
    queue<pair<int,int>> q;
    q.push({sx, sy});
    vis[sx][sy] = 1;
    while (!q.empty()) {
        int x = q.front().first;
        int y = q.front().second;
        q.pop();
        if (x == ex && y == ey) {
            printf("YES\n");
            return 0;
        }
        for (int k=0; k<4; k++) {
            if (dir[x][y][k]) {
                int nx = x + dx[k];
                int ny = y + dy[k];
                if (!vis[nx][ny]) {
                    vis[nx][ny] = 1;
                    q.push({nx, ny});
                }
            }
        }
    }
    printf("NO\n");
}

Compilation message

Main.cpp: In function 'int main()':
Main.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |     scanf("%d %d %d %d", &W, &H, &K, &L);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:19:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   19 |     scanf("%d %d", &t, &sy);
      |     ~~~~~^~~~~~~~~~~~~~~~~~
Main.cpp:20:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   20 |     scanf("%d %d", &sx, &t);
      |     ~~~~~^~~~~~~~~~~~~~~~~~
Main.cpp:27:18: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   27 |             scanf(" %c", &c);
      |             ~~~~~^~~~~~~~~~~
Main.cpp:117:26: warning: 'ey' may be used uninitialized in this function [-Wmaybe-uninitialized]
  117 |         if (x == ex && y == ey) {
      |                        ~~^~~~~
Main.cpp:117:15: warning: 'ex' may be used uninitialized in this function [-Wmaybe-uninitialized]
  117 |         if (x == ex && y == ey) {
      |             ~~^~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 604 KB Output is correct
4 Correct 1 ms 1116 KB Output is correct
5 Correct 1 ms 1116 KB Output is correct
6 Correct 1 ms 3164 KB Output is correct
7 Correct 1 ms 1112 KB Output is correct
8 Correct 1 ms 1116 KB Output is correct
9 Correct 1 ms 860 KB Output is correct
10 Correct 1 ms 1116 KB Output is correct
11 Correct 1 ms 860 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 2908 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 1 ms 1116 KB Output is correct
16 Correct 1 ms 1116 KB Output is correct
17 Correct 1 ms 1116 KB Output is correct
18 Correct 1 ms 1116 KB Output is correct
19 Correct 1 ms 1116 KB Output is correct
20 Correct 1 ms 1116 KB Output is correct
21 Correct 1 ms 1116 KB Output is correct
22 Correct 1 ms 1368 KB Output is correct
23 Correct 1 ms 1112 KB Output is correct
24 Correct 1 ms 1372 KB Output is correct
25 Correct 1 ms 1372 KB Output is correct
26 Correct 1 ms 1372 KB Output is correct
27 Correct 1 ms 1372 KB Output is correct
28 Correct 1 ms 1368 KB Output is correct
29 Correct 1 ms 1372 KB Output is correct
30 Correct 1 ms 1116 KB Output is correct
31 Correct 1 ms 1116 KB Output is correct
32 Correct 1 ms 3160 KB Output is correct
33 Correct 1 ms 1112 KB Output is correct
34 Correct 1 ms 1116 KB Output is correct
35 Correct 1 ms 1116 KB Output is correct
36 Correct 1 ms 2908 KB Output is correct
37 Correct 1 ms 1116 KB Output is correct
38 Correct 1 ms 1116 KB Output is correct
39 Correct 1 ms 1116 KB Output is correct
40 Correct 1 ms 1116 KB Output is correct
41 Correct 1 ms 1116 KB Output is correct
42 Correct 1 ms 1116 KB Output is correct
43 Correct 1 ms 1116 KB Output is correct
44 Correct 1 ms 2908 KB Output is correct
45 Correct 1 ms 1116 KB Output is correct
46 Correct 1 ms 2652 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 604 KB Output is correct
4 Correct 1 ms 1116 KB Output is correct
5 Correct 1 ms 1116 KB Output is correct
6 Correct 1 ms 3164 KB Output is correct
7 Correct 1 ms 1112 KB Output is correct
8 Correct 1 ms 1116 KB Output is correct
9 Correct 1 ms 860 KB Output is correct
10 Correct 1 ms 1116 KB Output is correct
11 Correct 1 ms 860 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 2908 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 1 ms 1116 KB Output is correct
16 Correct 1 ms 1116 KB Output is correct
17 Correct 1 ms 1116 KB Output is correct
18 Correct 1 ms 1116 KB Output is correct
19 Correct 1 ms 1116 KB Output is correct
20 Correct 1 ms 1116 KB Output is correct
21 Correct 1 ms 1116 KB Output is correct
22 Correct 1 ms 1368 KB Output is correct
23 Correct 1 ms 1112 KB Output is correct
24 Correct 1 ms 1372 KB Output is correct
25 Correct 1 ms 1372 KB Output is correct
26 Correct 1 ms 1372 KB Output is correct
27 Correct 1 ms 1372 KB Output is correct
28 Correct 1 ms 1368 KB Output is correct
29 Correct 1 ms 1372 KB Output is correct
30 Correct 1 ms 1116 KB Output is correct
31 Correct 1 ms 1116 KB Output is correct
32 Correct 1 ms 3160 KB Output is correct
33 Correct 1 ms 1112 KB Output is correct
34 Correct 1 ms 1116 KB Output is correct
35 Correct 1 ms 1116 KB Output is correct
36 Correct 1 ms 2908 KB Output is correct
37 Correct 1 ms 1116 KB Output is correct
38 Correct 1 ms 1116 KB Output is correct
39 Correct 1 ms 1116 KB Output is correct
40 Correct 1 ms 1116 KB Output is correct
41 Correct 1 ms 1116 KB Output is correct
42 Correct 1 ms 1116 KB Output is correct
43 Correct 1 ms 1116 KB Output is correct
44 Correct 1 ms 2908 KB Output is correct
45 Correct 1 ms 1116 KB Output is correct
46 Correct 1 ms 2652 KB Output is correct
47 Correct 1 ms 860 KB Output is correct
48 Correct 1 ms 1628 KB Output is correct
49 Correct 1 ms 1628 KB Output is correct
50 Correct 1 ms 3676 KB Output is correct
51 Correct 1 ms 1884 KB Output is correct
52 Correct 1 ms 1884 KB Output is correct
53 Correct 1 ms 1372 KB Output is correct
54 Correct 1 ms 1628 KB Output is correct
55 Correct 1 ms 1564 KB Output is correct
56 Correct 1 ms 1372 KB Output is correct
57 Correct 1 ms 1628 KB Output is correct
58 Correct 1 ms 1628 KB Output is correct
59 Correct 2 ms 3932 KB Output is correct
60 Correct 1 ms 1884 KB Output is correct
61 Correct 2 ms 1884 KB Output is correct
62 Correct 1 ms 2140 KB Output is correct
63 Correct 1 ms 1884 KB Output is correct
64 Correct 1 ms 1884 KB Output is correct
65 Correct 2 ms 2140 KB Output is correct
66 Correct 1 ms 1884 KB Output is correct
67 Correct 1 ms 1884 KB Output is correct
68 Correct 1 ms 2140 KB Output is correct
69 Correct 2 ms 2140 KB Output is correct
70 Correct 2 ms 2396 KB Output is correct
71 Correct 1 ms 2396 KB Output is correct
72 Correct 1 ms 2396 KB Output is correct
73 Correct 1 ms 2140 KB Output is correct
74 Correct 1 ms 1884 KB Output is correct
75 Correct 1 ms 3932 KB Output is correct
76 Correct 2 ms 1884 KB Output is correct
77 Correct 2 ms 1880 KB Output is correct
78 Correct 1 ms 1884 KB Output is correct
79 Correct 2 ms 1884 KB Output is correct
80 Correct 1 ms 1884 KB Output is correct
81 Correct 1 ms 1884 KB Output is correct
82 Correct 1 ms 2136 KB Output is correct
83 Correct 1 ms 1884 KB Output is correct
84 Correct 1 ms 1884 KB Output is correct
85 Correct 1 ms 2140 KB Output is correct
86 Correct 2 ms 3676 KB Output is correct
87 Correct 2 ms 3676 KB Output is correct
88 Correct 1 ms 1884 KB Output is correct
89 Correct 1 ms 1884 KB Output is correct
90 Correct 1 ms 1628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 860 KB Output is correct
4 Correct 7 ms 7568 KB Output is correct
5 Correct 7 ms 6748 KB Output is correct
6 Correct 2 ms 3676 KB Output is correct
7 Correct 8 ms 8860 KB Output is correct
8 Correct 9 ms 9564 KB Output is correct
9 Correct 3 ms 4444 KB Output is correct
10 Correct 7 ms 8540 KB Output is correct
11 Correct 7 ms 8476 KB Output is correct
12 Correct 3 ms 4956 KB Output is correct
13 Correct 7 ms 7116 KB Output is correct
14 Correct 6 ms 4956 KB Output is correct
15 Correct 8 ms 7516 KB Output is correct
16 Correct 7 ms 7100 KB Output is correct
17 Correct 7 ms 7260 KB Output is correct
18 Correct 8 ms 7772 KB Output is correct
19 Correct 8 ms 7516 KB Output is correct
20 Correct 8 ms 7528 KB Output is correct
21 Correct 8 ms 7608 KB Output is correct
22 Correct 8 ms 8796 KB Output is correct
23 Correct 8 ms 7772 KB Output is correct
24 Correct 8 ms 8332 KB Output is correct
25 Correct 10 ms 8284 KB Output is correct
26 Correct 14 ms 8540 KB Output is correct
27 Correct 8 ms 8468 KB Output is correct
28 Correct 8 ms 8540 KB Output is correct
29 Correct 8 ms 8540 KB Output is correct
30 Correct 11 ms 5980 KB Output is correct
31 Correct 10 ms 7300 KB Output is correct
32 Correct 7 ms 7260 KB Output is correct
33 Correct 7 ms 7088 KB Output is correct
34 Correct 6 ms 6748 KB Output is correct
35 Correct 6 ms 6540 KB Output is correct
36 Correct 11 ms 7260 KB Output is correct
37 Correct 8 ms 7488 KB Output is correct
38 Correct 6 ms 7472 KB Output is correct
39 Correct 12 ms 7516 KB Output is correct
40 Correct 7 ms 7516 KB Output is correct
41 Correct 7 ms 7640 KB Output is correct
42 Correct 10 ms 8796 KB Output is correct
43 Correct 8 ms 8540 KB Output is correct
44 Correct 7 ms 7772 KB Output is correct
45 Correct 8 ms 8540 KB Output is correct
46 Correct 6 ms 4816 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 604 KB Output is correct
4 Correct 1 ms 1116 KB Output is correct
5 Correct 1 ms 1116 KB Output is correct
6 Correct 1 ms 3164 KB Output is correct
7 Correct 1 ms 1112 KB Output is correct
8 Correct 1 ms 1116 KB Output is correct
9 Correct 1 ms 860 KB Output is correct
10 Correct 1 ms 1116 KB Output is correct
11 Correct 1 ms 860 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 2908 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 1 ms 1116 KB Output is correct
16 Correct 1 ms 1116 KB Output is correct
17 Correct 1 ms 1116 KB Output is correct
18 Correct 1 ms 1116 KB Output is correct
19 Correct 1 ms 1116 KB Output is correct
20 Correct 1 ms 1116 KB Output is correct
21 Correct 1 ms 1116 KB Output is correct
22 Correct 1 ms 1368 KB Output is correct
23 Correct 1 ms 1112 KB Output is correct
24 Correct 1 ms 1372 KB Output is correct
25 Correct 1 ms 1372 KB Output is correct
26 Correct 1 ms 1372 KB Output is correct
27 Correct 1 ms 1372 KB Output is correct
28 Correct 1 ms 1368 KB Output is correct
29 Correct 1 ms 1372 KB Output is correct
30 Correct 1 ms 1116 KB Output is correct
31 Correct 1 ms 1116 KB Output is correct
32 Correct 1 ms 3160 KB Output is correct
33 Correct 1 ms 1112 KB Output is correct
34 Correct 1 ms 1116 KB Output is correct
35 Correct 1 ms 1116 KB Output is correct
36 Correct 1 ms 2908 KB Output is correct
37 Correct 1 ms 1116 KB Output is correct
38 Correct 1 ms 1116 KB Output is correct
39 Correct 1 ms 1116 KB Output is correct
40 Correct 1 ms 1116 KB Output is correct
41 Correct 1 ms 1116 KB Output is correct
42 Correct 1 ms 1116 KB Output is correct
43 Correct 1 ms 1116 KB Output is correct
44 Correct 1 ms 2908 KB Output is correct
45 Correct 1 ms 1116 KB Output is correct
46 Correct 1 ms 2652 KB Output is correct
47 Correct 1 ms 860 KB Output is correct
48 Correct 1 ms 1628 KB Output is correct
49 Correct 1 ms 1628 KB Output is correct
50 Correct 1 ms 3676 KB Output is correct
51 Correct 1 ms 1884 KB Output is correct
52 Correct 1 ms 1884 KB Output is correct
53 Correct 1 ms 1372 KB Output is correct
54 Correct 1 ms 1628 KB Output is correct
55 Correct 1 ms 1564 KB Output is correct
56 Correct 1 ms 1372 KB Output is correct
57 Correct 1 ms 1628 KB Output is correct
58 Correct 1 ms 1628 KB Output is correct
59 Correct 2 ms 3932 KB Output is correct
60 Correct 1 ms 1884 KB Output is correct
61 Correct 2 ms 1884 KB Output is correct
62 Correct 1 ms 2140 KB Output is correct
63 Correct 1 ms 1884 KB Output is correct
64 Correct 1 ms 1884 KB Output is correct
65 Correct 2 ms 2140 KB Output is correct
66 Correct 1 ms 1884 KB Output is correct
67 Correct 1 ms 1884 KB Output is correct
68 Correct 1 ms 2140 KB Output is correct
69 Correct 2 ms 2140 KB Output is correct
70 Correct 2 ms 2396 KB Output is correct
71 Correct 1 ms 2396 KB Output is correct
72 Correct 1 ms 2396 KB Output is correct
73 Correct 1 ms 2140 KB Output is correct
74 Correct 1 ms 1884 KB Output is correct
75 Correct 1 ms 3932 KB Output is correct
76 Correct 2 ms 1884 KB Output is correct
77 Correct 2 ms 1880 KB Output is correct
78 Correct 1 ms 1884 KB Output is correct
79 Correct 2 ms 1884 KB Output is correct
80 Correct 1 ms 1884 KB Output is correct
81 Correct 1 ms 1884 KB Output is correct
82 Correct 1 ms 2136 KB Output is correct
83 Correct 1 ms 1884 KB Output is correct
84 Correct 1 ms 1884 KB Output is correct
85 Correct 1 ms 2140 KB Output is correct
86 Correct 2 ms 3676 KB Output is correct
87 Correct 2 ms 3676 KB Output is correct
88 Correct 1 ms 1884 KB Output is correct
89 Correct 1 ms 1884 KB Output is correct
90 Correct 1 ms 1628 KB Output is correct
91 Correct 1 ms 860 KB Output is correct
92 Correct 7 ms 7568 KB Output is correct
93 Correct 7 ms 6748 KB Output is correct
94 Correct 2 ms 3676 KB Output is correct
95 Correct 8 ms 8860 KB Output is correct
96 Correct 9 ms 9564 KB Output is correct
97 Correct 3 ms 4444 KB Output is correct
98 Correct 7 ms 8540 KB Output is correct
99 Correct 7 ms 8476 KB Output is correct
100 Correct 3 ms 4956 KB Output is correct
101 Correct 7 ms 7116 KB Output is correct
102 Correct 6 ms 4956 KB Output is correct
103 Correct 8 ms 7516 KB Output is correct
104 Correct 7 ms 7100 KB Output is correct
105 Correct 7 ms 7260 KB Output is correct
106 Correct 8 ms 7772 KB Output is correct
107 Correct 8 ms 7516 KB Output is correct
108 Correct 8 ms 7528 KB Output is correct
109 Correct 8 ms 7608 KB Output is correct
110 Correct 8 ms 8796 KB Output is correct
111 Correct 8 ms 7772 KB Output is correct
112 Correct 8 ms 8332 KB Output is correct
113 Correct 10 ms 8284 KB Output is correct
114 Correct 14 ms 8540 KB Output is correct
115 Correct 8 ms 8468 KB Output is correct
116 Correct 8 ms 8540 KB Output is correct
117 Correct 8 ms 8540 KB Output is correct
118 Correct 11 ms 5980 KB Output is correct
119 Correct 10 ms 7300 KB Output is correct
120 Correct 7 ms 7260 KB Output is correct
121 Correct 7 ms 7088 KB Output is correct
122 Correct 6 ms 6748 KB Output is correct
123 Correct 6 ms 6540 KB Output is correct
124 Correct 11 ms 7260 KB Output is correct
125 Correct 8 ms 7488 KB Output is correct
126 Correct 6 ms 7472 KB Output is correct
127 Correct 12 ms 7516 KB Output is correct
128 Correct 7 ms 7516 KB Output is correct
129 Correct 7 ms 7640 KB Output is correct
130 Correct 10 ms 8796 KB Output is correct
131 Correct 8 ms 8540 KB Output is correct
132 Correct 7 ms 7772 KB Output is correct
133 Correct 8 ms 8540 KB Output is correct
134 Correct 6 ms 4816 KB Output is correct
135 Correct 3 ms 4188 KB Output is correct
136 Correct 9 ms 9820 KB Output is correct
137 Correct 8 ms 8284 KB Output is correct
138 Correct 4 ms 4188 KB Output is correct
139 Correct 9 ms 9116 KB Output is correct
140 Correct 10 ms 7420 KB Output is correct
141 Correct 4 ms 4956 KB Output is correct
142 Correct 7 ms 6284 KB Output is correct
143 Correct 8 ms 6236 KB Output is correct
144 Correct 1 ms 860 KB Output is correct
145 Correct 8 ms 6260 KB Output is correct
146 Correct 8 ms 7372 KB Output is correct
147 Correct 10 ms 9176 KB Output is correct
148 Correct 10 ms 9156 KB Output is correct
149 Correct 10 ms 8796 KB Output is correct
150 Correct 15 ms 9564 KB Output is correct
151 Correct 12 ms 9764 KB Output is correct
152 Correct 12 ms 9656 KB Output is correct
153 Correct 12 ms 9564 KB Output is correct
154 Correct 11 ms 9700 KB Output is correct
155 Correct 12 ms 9564 KB Output is correct
156 Correct 11 ms 11672 KB Output is correct
157 Correct 13 ms 10360 KB Output is correct
158 Correct 10 ms 11892 KB Output is correct
159 Correct 13 ms 10796 KB Output is correct
160 Correct 12 ms 10856 KB Output is correct
161 Correct 12 ms 10856 KB Output is correct
162 Correct 11 ms 9064 KB Output is correct
163 Correct 12 ms 8944 KB Output is correct
164 Correct 12 ms 8180 KB Output is correct
165 Correct 11 ms 8764 KB Output is correct
166 Correct 14 ms 9196 KB Output is correct
167 Correct 10 ms 8764 KB Output is correct
168 Correct 8 ms 9220 KB Output is correct
169 Correct 9 ms 9352 KB Output is correct
170 Correct 11 ms 9444 KB Output is correct
171 Correct 9 ms 9064 KB Output is correct
172 Correct 8 ms 10088 KB Output is correct
173 Correct 11 ms 10456 KB Output is correct
174 Correct 15 ms 8808 KB Output is correct
175 Correct 9 ms 9576 KB Output is correct
176 Correct 9 ms 8836 KB Output is correct
177 Correct 9 ms 9320 KB Output is correct
178 Correct 7 ms 5992 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 604 KB Output is correct
4 Correct 1 ms 1116 KB Output is correct
5 Correct 1 ms 1116 KB Output is correct
6 Correct 1 ms 3164 KB Output is correct
7 Correct 1 ms 1112 KB Output is correct
8 Correct 1 ms 1116 KB Output is correct
9 Correct 1 ms 860 KB Output is correct
10 Correct 1 ms 1116 KB Output is correct
11 Correct 1 ms 860 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 2908 KB Output is correct
14 Correct 1 ms 860 KB Output is correct
15 Correct 1 ms 1116 KB Output is correct
16 Correct 1 ms 1116 KB Output is correct
17 Correct 1 ms 1116 KB Output is correct
18 Correct 1 ms 1116 KB Output is correct
19 Correct 1 ms 1116 KB Output is correct
20 Correct 1 ms 1116 KB Output is correct
21 Correct 1 ms 1116 KB Output is correct
22 Correct 1 ms 1368 KB Output is correct
23 Correct 1 ms 1112 KB Output is correct
24 Correct 1 ms 1372 KB Output is correct
25 Correct 1 ms 1372 KB Output is correct
26 Correct 1 ms 1372 KB Output is correct
27 Correct 1 ms 1372 KB Output is correct
28 Correct 1 ms 1368 KB Output is correct
29 Correct 1 ms 1372 KB Output is correct
30 Correct 1 ms 1116 KB Output is correct
31 Correct 1 ms 1116 KB Output is correct
32 Correct 1 ms 3160 KB Output is correct
33 Correct 1 ms 1112 KB Output is correct
34 Correct 1 ms 1116 KB Output is correct
35 Correct 1 ms 1116 KB Output is correct
36 Correct 1 ms 2908 KB Output is correct
37 Correct 1 ms 1116 KB Output is correct
38 Correct 1 ms 1116 KB Output is correct
39 Correct 1 ms 1116 KB Output is correct
40 Correct 1 ms 1116 KB Output is correct
41 Correct 1 ms 1116 KB Output is correct
42 Correct 1 ms 1116 KB Output is correct
43 Correct 1 ms 1116 KB Output is correct
44 Correct 1 ms 2908 KB Output is correct
45 Correct 1 ms 1116 KB Output is correct
46 Correct 1 ms 2652 KB Output is correct
47 Correct 1 ms 860 KB Output is correct
48 Correct 1 ms 1628 KB Output is correct
49 Correct 1 ms 1628 KB Output is correct
50 Correct 1 ms 3676 KB Output is correct
51 Correct 1 ms 1884 KB Output is correct
52 Correct 1 ms 1884 KB Output is correct
53 Correct 1 ms 1372 KB Output is correct
54 Correct 1 ms 1628 KB Output is correct
55 Correct 1 ms 1564 KB Output is correct
56 Correct 1 ms 1372 KB Output is correct
57 Correct 1 ms 1628 KB Output is correct
58 Correct 1 ms 1628 KB Output is correct
59 Correct 2 ms 3932 KB Output is correct
60 Correct 1 ms 1884 KB Output is correct
61 Correct 2 ms 1884 KB Output is correct
62 Correct 1 ms 2140 KB Output is correct
63 Correct 1 ms 1884 KB Output is correct
64 Correct 1 ms 1884 KB Output is correct
65 Correct 2 ms 2140 KB Output is correct
66 Correct 1 ms 1884 KB Output is correct
67 Correct 1 ms 1884 KB Output is correct
68 Correct 1 ms 2140 KB Output is correct
69 Correct 2 ms 2140 KB Output is correct
70 Correct 2 ms 2396 KB Output is correct
71 Correct 1 ms 2396 KB Output is correct
72 Correct 1 ms 2396 KB Output is correct
73 Correct 1 ms 2140 KB Output is correct
74 Correct 1 ms 1884 KB Output is correct
75 Correct 1 ms 3932 KB Output is correct
76 Correct 2 ms 1884 KB Output is correct
77 Correct 2 ms 1880 KB Output is correct
78 Correct 1 ms 1884 KB Output is correct
79 Correct 2 ms 1884 KB Output is correct
80 Correct 1 ms 1884 KB Output is correct
81 Correct 1 ms 1884 KB Output is correct
82 Correct 1 ms 2136 KB Output is correct
83 Correct 1 ms 1884 KB Output is correct
84 Correct 1 ms 1884 KB Output is correct
85 Correct 1 ms 2140 KB Output is correct
86 Correct 2 ms 3676 KB Output is correct
87 Correct 2 ms 3676 KB Output is correct
88 Correct 1 ms 1884 KB Output is correct
89 Correct 1 ms 1884 KB Output is correct
90 Correct 1 ms 1628 KB Output is correct
91 Correct 1 ms 860 KB Output is correct
92 Correct 7 ms 7568 KB Output is correct
93 Correct 7 ms 6748 KB Output is correct
94 Correct 2 ms 3676 KB Output is correct
95 Correct 8 ms 8860 KB Output is correct
96 Correct 9 ms 9564 KB Output is correct
97 Correct 3 ms 4444 KB Output is correct
98 Correct 7 ms 8540 KB Output is correct
99 Correct 7 ms 8476 KB Output is correct
100 Correct 3 ms 4956 KB Output is correct
101 Correct 7 ms 7116 KB Output is correct
102 Correct 6 ms 4956 KB Output is correct
103 Correct 8 ms 7516 KB Output is correct
104 Correct 7 ms 7100 KB Output is correct
105 Correct 7 ms 7260 KB Output is correct
106 Correct 8 ms 7772 KB Output is correct
107 Correct 8 ms 7516 KB Output is correct
108 Correct 8 ms 7528 KB Output is correct
109 Correct 8 ms 7608 KB Output is correct
110 Correct 8 ms 8796 KB Output is correct
111 Correct 8 ms 7772 KB Output is correct
112 Correct 8 ms 8332 KB Output is correct
113 Correct 10 ms 8284 KB Output is correct
114 Correct 14 ms 8540 KB Output is correct
115 Correct 8 ms 8468 KB Output is correct
116 Correct 8 ms 8540 KB Output is correct
117 Correct 8 ms 8540 KB Output is correct
118 Correct 11 ms 5980 KB Output is correct
119 Correct 10 ms 7300 KB Output is correct
120 Correct 7 ms 7260 KB Output is correct
121 Correct 7 ms 7088 KB Output is correct
122 Correct 6 ms 6748 KB Output is correct
123 Correct 6 ms 6540 KB Output is correct
124 Correct 11 ms 7260 KB Output is correct
125 Correct 8 ms 7488 KB Output is correct
126 Correct 6 ms 7472 KB Output is correct
127 Correct 12 ms 7516 KB Output is correct
128 Correct 7 ms 7516 KB Output is correct
129 Correct 7 ms 7640 KB Output is correct
130 Correct 10 ms 8796 KB Output is correct
131 Correct 8 ms 8540 KB Output is correct
132 Correct 7 ms 7772 KB Output is correct
133 Correct 8 ms 8540 KB Output is correct
134 Correct 6 ms 4816 KB Output is correct
135 Correct 3 ms 4188 KB Output is correct
136 Correct 9 ms 9820 KB Output is correct
137 Correct 8 ms 8284 KB Output is correct
138 Correct 4 ms 4188 KB Output is correct
139 Correct 9 ms 9116 KB Output is correct
140 Correct 10 ms 7420 KB Output is correct
141 Correct 4 ms 4956 KB Output is correct
142 Correct 7 ms 6284 KB Output is correct
143 Correct 8 ms 6236 KB Output is correct
144 Correct 1 ms 860 KB Output is correct
145 Correct 8 ms 6260 KB Output is correct
146 Correct 8 ms 7372 KB Output is correct
147 Correct 10 ms 9176 KB Output is correct
148 Correct 10 ms 9156 KB Output is correct
149 Correct 10 ms 8796 KB Output is correct
150 Correct 15 ms 9564 KB Output is correct
151 Correct 12 ms 9764 KB Output is correct
152 Correct 12 ms 9656 KB Output is correct
153 Correct 12 ms 9564 KB Output is correct
154 Correct 11 ms 9700 KB Output is correct
155 Correct 12 ms 9564 KB Output is correct
156 Correct 11 ms 11672 KB Output is correct
157 Correct 13 ms 10360 KB Output is correct
158 Correct 10 ms 11892 KB Output is correct
159 Correct 13 ms 10796 KB Output is correct
160 Correct 12 ms 10856 KB Output is correct
161 Correct 12 ms 10856 KB Output is correct
162 Correct 11 ms 9064 KB Output is correct
163 Correct 12 ms 8944 KB Output is correct
164 Correct 12 ms 8180 KB Output is correct
165 Correct 11 ms 8764 KB Output is correct
166 Correct 14 ms 9196 KB Output is correct
167 Correct 10 ms 8764 KB Output is correct
168 Correct 8 ms 9220 KB Output is correct
169 Correct 9 ms 9352 KB Output is correct
170 Correct 11 ms 9444 KB Output is correct
171 Correct 9 ms 9064 KB Output is correct
172 Correct 8 ms 10088 KB Output is correct
173 Correct 11 ms 10456 KB Output is correct
174 Correct 15 ms 8808 KB Output is correct
175 Correct 9 ms 9576 KB Output is correct
176 Correct 9 ms 8836 KB Output is correct
177 Correct 9 ms 9320 KB Output is correct
178 Correct 7 ms 5992 KB Output is correct
179 Correct 39 ms 26208 KB Output is correct
180 Correct 153 ms 59680 KB Output is correct
181 Correct 112 ms 59716 KB Output is correct
182 Correct 30 ms 17548 KB Output is correct
183 Correct 117 ms 43288 KB Output is correct
184 Correct 106 ms 27064 KB Output is correct
185 Correct 83 ms 23792 KB Output is correct
186 Correct 106 ms 26968 KB Output is correct
187 Correct 102 ms 27008 KB Output is correct
188 Correct 63 ms 21744 KB Output is correct
189 Correct 120 ms 26968 KB Output is correct
190 Correct 112 ms 26896 KB Output is correct
191 Correct 183 ms 56232 KB Output is correct
192 Correct 208 ms 63412 KB Output is correct
193 Correct 171 ms 57784 KB Output is correct
194 Correct 223 ms 62288 KB Output is correct
195 Correct 223 ms 62372 KB Output is correct
196 Correct 189 ms 62372 KB Output is correct
197 Correct 195 ms 62388 KB Output is correct
198 Correct 206 ms 62548 KB Output is correct
199 Correct 187 ms 62376 KB Output is correct
200 Correct 191 ms 65968 KB Output is correct
201 Correct 192 ms 65792 KB Output is correct
202 Correct 190 ms 67408 KB Output is correct
203 Correct 189 ms 67412 KB Output is correct
204 Correct 186 ms 67408 KB Output is correct
205 Correct 184 ms 67408 KB Output is correct
206 Correct 147 ms 59820 KB Output is correct
207 Correct 171 ms 57684 KB Output is correct
208 Correct 152 ms 57780 KB Output is correct
209 Correct 168 ms 62548 KB Output is correct
210 Correct 172 ms 58700 KB Output is correct
211 Correct 129 ms 54352 KB Output is correct
212 Correct 117 ms 57168 KB Output is correct
213 Correct 140 ms 58852 KB Output is correct
214 Correct 139 ms 58452 KB Output is correct
215 Correct 141 ms 60096 KB Output is correct
216 Correct 133 ms 58192 KB Output is correct
217 Correct 134 ms 59824 KB Output is correct
218 Correct 108 ms 55888 KB Output is correct
219 Correct 121 ms 59732 KB Output is correct
220 Correct 149 ms 62292 KB Output is correct
221 Correct 132 ms 61880 KB Output is correct
222 Correct 82 ms 25684 KB Output is correct