답안 #1070139

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1070139 2024-08-22T11:51:15 Z vjudge1 Toy (CEOI24_toy) C++17
100 / 100
342 ms 285468 KB
#include <bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;
vector<vector<int>>najljevlji,najdesniji,najgornji,najdonji;
vector<vector<char>>grid;
int w,h,k,l,xh,yh,xv,yv,x,y;
vector<vector<bool>>visited;
void dfs(int x1,int y1){
    if(visited[x1][y1])return;
    visited[x1][y1]=true;
    if(grid[x1+1][y1]!='X'){
        if(najdesniji[x1+1][y1]<=najljevlji[x1+1][y1])
        if(!((najdesniji[x1][y1]>najljevlji[x1+1][y1])||(najdesniji[x1+1][y1]>najljevlji[x1][y1])))dfs(x1+1,y1);
    }
    if(grid[x1-1][y1]!='X'){
        if(najdesniji[x1-1][y1]<=najljevlji[x1-1][y1])
        if(!((najdesniji[x1][y1]>najljevlji[x1-1][y1])||(najdesniji[x1-1][y1]>najljevlji[x1][y1])))dfs(x1-1,y1);
    }
    if(grid[x1][y1+1]!='X'){
        if(najgornji[x1][y1+1]>=najdonji[x1][y1+1])
        if(!((najgornji[x1][y1]<najdonji[x1][y1+1])||(najgornji[x1][y1+1]<najdonji[x1][y1])))dfs(x1,y1+1);
    }
    if(grid[x1][y1-1]!='X'){
        if(najgornji[x1][y1-1]>=najdonji[x1][y1-1])
        if(!((najgornji[x1][y1]<najdonji[x1][y1-1])||(najgornji[x1][y1-1]<najdonji[x1][y1])))dfs(x1,y1-1);
    }
}
signed main(){
    cin>>w>>h>>k>>l>>xh>>yh>>xv>>yv;xh++;yh++;xv++;yv++;
    grid.resize(h+2,vector<char>(w+2,'X'));
    for(int i=1;i<=h;i++){
        for(int j=1;j<=w;j++){
            cin>>grid[i][j];
            if(grid[i][j]=='*'){
                x=i;y=j;
            }
        }
    }
    visited.resize(h+2,vector<bool>(w+2,false));
    najljevlji.resize(h+2,vector<int>(w+2,k-1));
    najdesniji.resize(h+2,vector<int>(w+2,0));
    najdonji.resize(h+2,vector<int>(w+2,0));
    najgornji.resize(h+2,vector<int>(w+2,l-1));
    for(int i=0;i<h+2;i++){
        for(int j=0;j<w+2;j++){
            if(grid[i][j]=='X'){
                for(int num=0;num<k;num++){
                    if((j+num+1)<w+2){
                        if(grid[i][j+num+1]!='X')najljevlji[i][j+num+1]=num;
                        else break;
                    }else break;
                }
                for(int num=0;num<l;num++){
                    if((i+num+1)<h+2){
                        if(grid[i+num+1][j]!='X')najgornji[i+num+1][j]=num;
                        else break;
                    }else break;
                }
            }
        }
    }
    for(int i=h+1;i>=0;i--){
        for(int j=w+1;j>=0;j--){
            if(grid[i][j]=='X'){
                for(int num=0;num<k;num++){
                    if((j-num-1)>=0){
                        if(grid[i][j-num-1]!='X')najdesniji[i][j-num-1]=k-1-num;
                        else break;
                    }else break;
                }
                for(int num=0;num<l;num++){
                    if((i-num-1)>=0){
                        if(grid[i-num-1][j]!='X')najdonji[i-num-1][j]=l-1-num;
                        else break;
                    }else break;
                }
            }
        }
    }
    dfs(yh,xv);
    cout<<((visited[x][y]==true)?"YES\n":"NO\n");
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 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 0 ms 348 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 1 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 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 0 ms 604 KB Output is correct
20 Correct 1 ms 604 KB Output is correct
21 Correct 1 ms 600 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 0 ms 604 KB Output is correct
24 Correct 0 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 0 ms 604 KB Output is correct
27 Correct 1 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 0 ms 616 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 0 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 1 ms 604 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 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 0 ms 348 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 1 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 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 0 ms 604 KB Output is correct
20 Correct 1 ms 604 KB Output is correct
21 Correct 1 ms 600 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 0 ms 604 KB Output is correct
24 Correct 0 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 0 ms 604 KB Output is correct
27 Correct 1 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 0 ms 616 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 0 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 1 ms 604 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 1 ms 348 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 604 KB Output is correct
50 Correct 1 ms 604 KB Output is correct
51 Correct 1 ms 604 KB Output is correct
52 Correct 1 ms 604 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 1 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 1 ms 1112 KB Output is correct
60 Correct 1 ms 1116 KB Output is correct
61 Correct 1 ms 952 KB Output is correct
62 Correct 1 ms 1372 KB Output is correct
63 Correct 2 ms 1372 KB Output is correct
64 Correct 2 ms 1372 KB Output is correct
65 Correct 1 ms 1372 KB Output is correct
66 Correct 2 ms 1372 KB Output is correct
67 Correct 1 ms 1372 KB Output is correct
68 Correct 2 ms 1372 KB Output is correct
69 Correct 1 ms 1372 KB Output is correct
70 Correct 1 ms 1116 KB Output is correct
71 Correct 1 ms 1116 KB Output is correct
72 Correct 1 ms 1116 KB Output is correct
73 Correct 1 ms 1116 KB Output is correct
74 Correct 1 ms 1116 KB Output is correct
75 Correct 1 ms 1116 KB Output is correct
76 Correct 1 ms 1372 KB Output is correct
77 Correct 1 ms 1372 KB Output is correct
78 Correct 1 ms 1372 KB Output is correct
79 Correct 1 ms 1372 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 924 KB Output is correct
83 Correct 1 ms 860 KB Output is correct
84 Correct 1 ms 860 KB Output is correct
85 Correct 1 ms 860 KB Output is correct
86 Correct 1 ms 1372 KB Output is correct
87 Correct 1 ms 1116 KB Output is correct
88 Correct 1 ms 1116 KB Output is correct
89 Correct 1 ms 1116 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 11 ms 8792 KB Output is correct
5 Correct 9 ms 6748 KB Output is correct
6 Correct 1 ms 1116 KB Output is correct
7 Correct 9 ms 5468 KB Output is correct
8 Correct 8 ms 6236 KB Output is correct
9 Correct 2 ms 1368 KB Output is correct
10 Correct 6 ms 3404 KB Output is correct
11 Correct 4 ms 3420 KB Output is correct
12 Correct 2 ms 1624 KB Output is correct
13 Correct 6 ms 3420 KB Output is correct
14 Correct 5 ms 3420 KB Output is correct
15 Correct 10 ms 10460 KB Output is correct
16 Correct 9 ms 9564 KB Output is correct
17 Correct 10 ms 9544 KB Output is correct
18 Correct 11 ms 11868 KB Output is correct
19 Correct 11 ms 11724 KB Output is correct
20 Correct 10 ms 11796 KB Output is correct
21 Correct 10 ms 11868 KB Output is correct
22 Correct 11 ms 11868 KB Output is correct
23 Correct 11 ms 11864 KB Output is correct
24 Correct 10 ms 11792 KB Output is correct
25 Correct 13 ms 11868 KB Output is correct
26 Correct 8 ms 8584 KB Output is correct
27 Correct 10 ms 8540 KB Output is correct
28 Correct 9 ms 8540 KB Output is correct
29 Correct 9 ms 8476 KB Output is correct
30 Correct 10 ms 11352 KB Output is correct
31 Correct 10 ms 10844 KB Output is correct
32 Correct 11 ms 11532 KB Output is correct
33 Correct 10 ms 10844 KB Output is correct
34 Correct 10 ms 10588 KB Output is correct
35 Correct 10 ms 10712 KB Output is correct
36 Correct 4 ms 3164 KB Output is correct
37 Correct 8 ms 5904 KB Output is correct
38 Correct 6 ms 5464 KB Output is correct
39 Correct 6 ms 5648 KB Output is correct
40 Correct 6 ms 5976 KB Output is correct
41 Correct 6 ms 5468 KB Output is correct
42 Correct 11 ms 8976 KB Output is correct
43 Correct 10 ms 9564 KB Output is correct
44 Correct 9 ms 8028 KB Output is correct
45 Correct 11 ms 10076 KB Output is correct
46 Correct 4 ms 3088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 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 0 ms 348 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 1 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 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 0 ms 604 KB Output is correct
20 Correct 1 ms 604 KB Output is correct
21 Correct 1 ms 600 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 0 ms 604 KB Output is correct
24 Correct 0 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 0 ms 604 KB Output is correct
27 Correct 1 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 0 ms 616 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 0 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 1 ms 604 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 1 ms 348 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 604 KB Output is correct
50 Correct 1 ms 604 KB Output is correct
51 Correct 1 ms 604 KB Output is correct
52 Correct 1 ms 604 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 1 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 1 ms 1112 KB Output is correct
60 Correct 1 ms 1116 KB Output is correct
61 Correct 1 ms 952 KB Output is correct
62 Correct 1 ms 1372 KB Output is correct
63 Correct 2 ms 1372 KB Output is correct
64 Correct 2 ms 1372 KB Output is correct
65 Correct 1 ms 1372 KB Output is correct
66 Correct 2 ms 1372 KB Output is correct
67 Correct 1 ms 1372 KB Output is correct
68 Correct 2 ms 1372 KB Output is correct
69 Correct 1 ms 1372 KB Output is correct
70 Correct 1 ms 1116 KB Output is correct
71 Correct 1 ms 1116 KB Output is correct
72 Correct 1 ms 1116 KB Output is correct
73 Correct 1 ms 1116 KB Output is correct
74 Correct 1 ms 1116 KB Output is correct
75 Correct 1 ms 1116 KB Output is correct
76 Correct 1 ms 1372 KB Output is correct
77 Correct 1 ms 1372 KB Output is correct
78 Correct 1 ms 1372 KB Output is correct
79 Correct 1 ms 1372 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 924 KB Output is correct
83 Correct 1 ms 860 KB Output is correct
84 Correct 1 ms 860 KB Output is correct
85 Correct 1 ms 860 KB Output is correct
86 Correct 1 ms 1372 KB Output is correct
87 Correct 1 ms 1116 KB Output is correct
88 Correct 1 ms 1116 KB Output is correct
89 Correct 1 ms 1116 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 11 ms 8792 KB Output is correct
93 Correct 9 ms 6748 KB Output is correct
94 Correct 1 ms 1116 KB Output is correct
95 Correct 9 ms 5468 KB Output is correct
96 Correct 8 ms 6236 KB Output is correct
97 Correct 2 ms 1368 KB Output is correct
98 Correct 6 ms 3404 KB Output is correct
99 Correct 4 ms 3420 KB Output is correct
100 Correct 2 ms 1624 KB Output is correct
101 Correct 6 ms 3420 KB Output is correct
102 Correct 5 ms 3420 KB Output is correct
103 Correct 10 ms 10460 KB Output is correct
104 Correct 9 ms 9564 KB Output is correct
105 Correct 10 ms 9544 KB Output is correct
106 Correct 11 ms 11868 KB Output is correct
107 Correct 11 ms 11724 KB Output is correct
108 Correct 10 ms 11796 KB Output is correct
109 Correct 10 ms 11868 KB Output is correct
110 Correct 11 ms 11868 KB Output is correct
111 Correct 11 ms 11864 KB Output is correct
112 Correct 10 ms 11792 KB Output is correct
113 Correct 13 ms 11868 KB Output is correct
114 Correct 8 ms 8584 KB Output is correct
115 Correct 10 ms 8540 KB Output is correct
116 Correct 9 ms 8540 KB Output is correct
117 Correct 9 ms 8476 KB Output is correct
118 Correct 10 ms 11352 KB Output is correct
119 Correct 10 ms 10844 KB Output is correct
120 Correct 11 ms 11532 KB Output is correct
121 Correct 10 ms 10844 KB Output is correct
122 Correct 10 ms 10588 KB Output is correct
123 Correct 10 ms 10712 KB Output is correct
124 Correct 4 ms 3164 KB Output is correct
125 Correct 8 ms 5904 KB Output is correct
126 Correct 6 ms 5464 KB Output is correct
127 Correct 6 ms 5648 KB Output is correct
128 Correct 6 ms 5976 KB Output is correct
129 Correct 6 ms 5468 KB Output is correct
130 Correct 11 ms 8976 KB Output is correct
131 Correct 10 ms 9564 KB Output is correct
132 Correct 9 ms 8028 KB Output is correct
133 Correct 11 ms 10076 KB Output is correct
134 Correct 4 ms 3088 KB Output is correct
135 Correct 2 ms 1628 KB Output is correct
136 Correct 6 ms 4700 KB Output is correct
137 Correct 6 ms 4700 KB Output is correct
138 Correct 2 ms 1884 KB Output is correct
139 Correct 8 ms 4776 KB Output is correct
140 Correct 6 ms 4660 KB Output is correct
141 Correct 4 ms 2140 KB Output is correct
142 Correct 6 ms 4700 KB Output is correct
143 Correct 6 ms 4700 KB Output is correct
144 Correct 1 ms 604 KB Output is correct
145 Correct 8 ms 4676 KB Output is correct
146 Correct 8 ms 4700 KB Output is correct
147 Correct 12 ms 10588 KB Output is correct
148 Correct 13 ms 12632 KB Output is correct
149 Correct 13 ms 12380 KB Output is correct
150 Correct 16 ms 16940 KB Output is correct
151 Correct 17 ms 16732 KB Output is correct
152 Correct 20 ms 16732 KB Output is correct
153 Correct 16 ms 16728 KB Output is correct
154 Correct 15 ms 16732 KB Output is correct
155 Correct 16 ms 16732 KB Output is correct
156 Correct 15 ms 16908 KB Output is correct
157 Correct 15 ms 16728 KB Output is correct
158 Correct 13 ms 12380 KB Output is correct
159 Correct 14 ms 12468 KB Output is correct
160 Correct 14 ms 12380 KB Output is correct
161 Correct 13 ms 12124 KB Output is correct
162 Correct 18 ms 15448 KB Output is correct
163 Correct 14 ms 15040 KB Output is correct
164 Correct 18 ms 16220 KB Output is correct
165 Correct 20 ms 14944 KB Output is correct
166 Correct 16 ms 16048 KB Output is correct
167 Correct 15 ms 15196 KB Output is correct
168 Correct 5 ms 4440 KB Output is correct
169 Correct 9 ms 8028 KB Output is correct
170 Correct 12 ms 8284 KB Output is correct
171 Correct 8 ms 7852 KB Output is correct
172 Correct 8 ms 7328 KB Output is correct
173 Correct 10 ms 8024 KB Output is correct
174 Correct 14 ms 11612 KB Output is correct
175 Correct 15 ms 14756 KB Output is correct
176 Correct 14 ms 14144 KB Output is correct
177 Correct 14 ms 10820 KB Output is correct
178 Correct 5 ms 4188 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 604 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 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 0 ms 348 KB Output is correct
11 Correct 1 ms 348 KB Output is correct
12 Correct 1 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 0 ms 604 KB Output is correct
16 Correct 0 ms 604 KB Output is correct
17 Correct 1 ms 604 KB Output is correct
18 Correct 1 ms 604 KB Output is correct
19 Correct 0 ms 604 KB Output is correct
20 Correct 1 ms 604 KB Output is correct
21 Correct 1 ms 600 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 0 ms 604 KB Output is correct
24 Correct 0 ms 604 KB Output is correct
25 Correct 1 ms 604 KB Output is correct
26 Correct 0 ms 604 KB Output is correct
27 Correct 1 ms 604 KB Output is correct
28 Correct 1 ms 604 KB Output is correct
29 Correct 1 ms 604 KB Output is correct
30 Correct 0 ms 604 KB Output is correct
31 Correct 0 ms 604 KB Output is correct
32 Correct 0 ms 616 KB Output is correct
33 Correct 1 ms 604 KB Output is correct
34 Correct 0 ms 604 KB Output is correct
35 Correct 0 ms 604 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 1 ms 604 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 0 ms 348 KB Output is correct
47 Correct 1 ms 348 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 604 KB Output is correct
50 Correct 1 ms 604 KB Output is correct
51 Correct 1 ms 604 KB Output is correct
52 Correct 1 ms 604 KB Output is correct
53 Correct 0 ms 604 KB Output is correct
54 Correct 1 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 1 ms 1112 KB Output is correct
60 Correct 1 ms 1116 KB Output is correct
61 Correct 1 ms 952 KB Output is correct
62 Correct 1 ms 1372 KB Output is correct
63 Correct 2 ms 1372 KB Output is correct
64 Correct 2 ms 1372 KB Output is correct
65 Correct 1 ms 1372 KB Output is correct
66 Correct 2 ms 1372 KB Output is correct
67 Correct 1 ms 1372 KB Output is correct
68 Correct 2 ms 1372 KB Output is correct
69 Correct 1 ms 1372 KB Output is correct
70 Correct 1 ms 1116 KB Output is correct
71 Correct 1 ms 1116 KB Output is correct
72 Correct 1 ms 1116 KB Output is correct
73 Correct 1 ms 1116 KB Output is correct
74 Correct 1 ms 1116 KB Output is correct
75 Correct 1 ms 1116 KB Output is correct
76 Correct 1 ms 1372 KB Output is correct
77 Correct 1 ms 1372 KB Output is correct
78 Correct 1 ms 1372 KB Output is correct
79 Correct 1 ms 1372 KB Output is correct
80 Correct 1 ms 604 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 924 KB Output is correct
83 Correct 1 ms 860 KB Output is correct
84 Correct 1 ms 860 KB Output is correct
85 Correct 1 ms 860 KB Output is correct
86 Correct 1 ms 1372 KB Output is correct
87 Correct 1 ms 1116 KB Output is correct
88 Correct 1 ms 1116 KB Output is correct
89 Correct 1 ms 1116 KB Output is correct
90 Correct 1 ms 604 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 11 ms 8792 KB Output is correct
93 Correct 9 ms 6748 KB Output is correct
94 Correct 1 ms 1116 KB Output is correct
95 Correct 9 ms 5468 KB Output is correct
96 Correct 8 ms 6236 KB Output is correct
97 Correct 2 ms 1368 KB Output is correct
98 Correct 6 ms 3404 KB Output is correct
99 Correct 4 ms 3420 KB Output is correct
100 Correct 2 ms 1624 KB Output is correct
101 Correct 6 ms 3420 KB Output is correct
102 Correct 5 ms 3420 KB Output is correct
103 Correct 10 ms 10460 KB Output is correct
104 Correct 9 ms 9564 KB Output is correct
105 Correct 10 ms 9544 KB Output is correct
106 Correct 11 ms 11868 KB Output is correct
107 Correct 11 ms 11724 KB Output is correct
108 Correct 10 ms 11796 KB Output is correct
109 Correct 10 ms 11868 KB Output is correct
110 Correct 11 ms 11868 KB Output is correct
111 Correct 11 ms 11864 KB Output is correct
112 Correct 10 ms 11792 KB Output is correct
113 Correct 13 ms 11868 KB Output is correct
114 Correct 8 ms 8584 KB Output is correct
115 Correct 10 ms 8540 KB Output is correct
116 Correct 9 ms 8540 KB Output is correct
117 Correct 9 ms 8476 KB Output is correct
118 Correct 10 ms 11352 KB Output is correct
119 Correct 10 ms 10844 KB Output is correct
120 Correct 11 ms 11532 KB Output is correct
121 Correct 10 ms 10844 KB Output is correct
122 Correct 10 ms 10588 KB Output is correct
123 Correct 10 ms 10712 KB Output is correct
124 Correct 4 ms 3164 KB Output is correct
125 Correct 8 ms 5904 KB Output is correct
126 Correct 6 ms 5464 KB Output is correct
127 Correct 6 ms 5648 KB Output is correct
128 Correct 6 ms 5976 KB Output is correct
129 Correct 6 ms 5468 KB Output is correct
130 Correct 11 ms 8976 KB Output is correct
131 Correct 10 ms 9564 KB Output is correct
132 Correct 9 ms 8028 KB Output is correct
133 Correct 11 ms 10076 KB Output is correct
134 Correct 4 ms 3088 KB Output is correct
135 Correct 2 ms 1628 KB Output is correct
136 Correct 6 ms 4700 KB Output is correct
137 Correct 6 ms 4700 KB Output is correct
138 Correct 2 ms 1884 KB Output is correct
139 Correct 8 ms 4776 KB Output is correct
140 Correct 6 ms 4660 KB Output is correct
141 Correct 4 ms 2140 KB Output is correct
142 Correct 6 ms 4700 KB Output is correct
143 Correct 6 ms 4700 KB Output is correct
144 Correct 1 ms 604 KB Output is correct
145 Correct 8 ms 4676 KB Output is correct
146 Correct 8 ms 4700 KB Output is correct
147 Correct 12 ms 10588 KB Output is correct
148 Correct 13 ms 12632 KB Output is correct
149 Correct 13 ms 12380 KB Output is correct
150 Correct 16 ms 16940 KB Output is correct
151 Correct 17 ms 16732 KB Output is correct
152 Correct 20 ms 16732 KB Output is correct
153 Correct 16 ms 16728 KB Output is correct
154 Correct 15 ms 16732 KB Output is correct
155 Correct 16 ms 16732 KB Output is correct
156 Correct 15 ms 16908 KB Output is correct
157 Correct 15 ms 16728 KB Output is correct
158 Correct 13 ms 12380 KB Output is correct
159 Correct 14 ms 12468 KB Output is correct
160 Correct 14 ms 12380 KB Output is correct
161 Correct 13 ms 12124 KB Output is correct
162 Correct 18 ms 15448 KB Output is correct
163 Correct 14 ms 15040 KB Output is correct
164 Correct 18 ms 16220 KB Output is correct
165 Correct 20 ms 14944 KB Output is correct
166 Correct 16 ms 16048 KB Output is correct
167 Correct 15 ms 15196 KB Output is correct
168 Correct 5 ms 4440 KB Output is correct
169 Correct 9 ms 8028 KB Output is correct
170 Correct 12 ms 8284 KB Output is correct
171 Correct 8 ms 7852 KB Output is correct
172 Correct 8 ms 7328 KB Output is correct
173 Correct 10 ms 8024 KB Output is correct
174 Correct 14 ms 11612 KB Output is correct
175 Correct 15 ms 14756 KB Output is correct
176 Correct 14 ms 14144 KB Output is correct
177 Correct 14 ms 10820 KB Output is correct
178 Correct 5 ms 4188 KB Output is correct
179 Correct 24 ms 19804 KB Output is correct
180 Correct 104 ms 73844 KB Output is correct
181 Correct 117 ms 73868 KB Output is correct
182 Correct 27 ms 19536 KB Output is correct
183 Correct 108 ms 73864 KB Output is correct
184 Correct 118 ms 73856 KB Output is correct
185 Correct 88 ms 54096 KB Output is correct
186 Correct 111 ms 73812 KB Output is correct
187 Correct 107 ms 73808 KB Output is correct
188 Correct 69 ms 38744 KB Output is correct
189 Correct 131 ms 73864 KB Output is correct
190 Correct 137 ms 73808 KB Output is correct
191 Correct 228 ms 158296 KB Output is correct
192 Correct 256 ms 165200 KB Output is correct
193 Correct 248 ms 190032 KB Output is correct
194 Correct 291 ms 285064 KB Output is correct
195 Correct 301 ms 285468 KB Output is correct
196 Correct 342 ms 285276 KB Output is correct
197 Correct 308 ms 285288 KB Output is correct
198 Correct 307 ms 285268 KB Output is correct
199 Correct 299 ms 285264 KB Output is correct
200 Correct 293 ms 285008 KB Output is correct
201 Correct 293 ms 285012 KB Output is correct
202 Correct 267 ms 206420 KB Output is correct
203 Correct 259 ms 206472 KB Output is correct
204 Correct 255 ms 205904 KB Output is correct
205 Correct 258 ms 205904 KB Output is correct
206 Correct 254 ms 248916 KB Output is correct
207 Correct 263 ms 251472 KB Output is correct
208 Correct 243 ms 238672 KB Output is correct
209 Correct 261 ms 254804 KB Output is correct
210 Correct 255 ms 254032 KB Output is correct
211 Correct 273 ms 269648 KB Output is correct
212 Correct 83 ms 63796 KB Output is correct
213 Correct 150 ms 129876 KB Output is correct
214 Correct 136 ms 122948 KB Output is correct
215 Correct 143 ms 132288 KB Output is correct
216 Correct 141 ms 120912 KB Output is correct
217 Correct 139 ms 122964 KB Output is correct
218 Correct 289 ms 239908 KB Output is correct
219 Correct 299 ms 235604 KB Output is correct
220 Correct 292 ms 215892 KB Output is correct
221 Correct 285 ms 237348 KB Output is correct
222 Correct 89 ms 61992 KB Output is correct