Submission #1070137

# Submission time Handle Problem Language Result Execution time Memory
1070137 2024-08-22T11:50:32 Z naneosmic Toy (CEOI24_toy) C++14
100 / 100
378 ms 286964 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");
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 604 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 1 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 0 ms 348 KB Output is correct
15 Correct 1 ms 600 KB Output is correct
16 Correct 1 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 1 ms 600 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 0 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 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 1 ms 600 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 0 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 604 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 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 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 604 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 604 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 1 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 0 ms 348 KB Output is correct
15 Correct 1 ms 600 KB Output is correct
16 Correct 1 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 1 ms 600 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 0 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 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 1 ms 600 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 0 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 604 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 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 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 604 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 696 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 700 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 1 ms 660 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 1 ms 600 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 1 ms 1116 KB Output is correct
60 Correct 1 ms 1116 KB Output is correct
61 Correct 2 ms 860 KB Output is correct
62 Correct 1 ms 1472 KB Output is correct
63 Correct 1 ms 1372 KB Output is correct
64 Correct 1 ms 1368 KB Output is correct
65 Correct 1 ms 1372 KB Output is correct
66 Correct 1 ms 1372 KB Output is correct
67 Correct 1 ms 1372 KB Output is correct
68 Correct 1 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 1372 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 636 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 860 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 600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Correct 10 ms 8776 KB Output is correct
5 Correct 8 ms 6928 KB Output is correct
6 Correct 1 ms 1112 KB Output is correct
7 Correct 8 ms 5464 KB Output is correct
8 Correct 9 ms 6236 KB Output is correct
9 Correct 2 ms 1372 KB Output is correct
10 Correct 4 ms 3420 KB Output is correct
11 Correct 4 ms 3420 KB Output is correct
12 Correct 2 ms 1372 KB Output is correct
13 Correct 6 ms 3420 KB Output is correct
14 Correct 6 ms 3420 KB Output is correct
15 Correct 11 ms 10332 KB Output is correct
16 Correct 9 ms 9564 KB Output is correct
17 Correct 9 ms 9308 KB Output is correct
18 Correct 11 ms 11796 KB Output is correct
19 Correct 11 ms 11916 KB Output is correct
20 Correct 12 ms 11908 KB Output is correct
21 Correct 10 ms 11928 KB Output is correct
22 Correct 11 ms 11868 KB Output is correct
23 Correct 15 ms 11868 KB Output is correct
24 Correct 11 ms 11868 KB Output is correct
25 Correct 11 ms 11884 KB Output is correct
26 Correct 9 ms 8540 KB Output is correct
27 Correct 9 ms 8468 KB Output is correct
28 Correct 9 ms 8464 KB Output is correct
29 Correct 9 ms 8540 KB Output is correct
30 Correct 13 ms 11356 KB Output is correct
31 Correct 14 ms 11056 KB Output is correct
32 Correct 12 ms 11612 KB Output is correct
33 Correct 13 ms 10844 KB Output is correct
34 Correct 10 ms 10588 KB Output is correct
35 Correct 10 ms 10844 KB Output is correct
36 Correct 4 ms 3164 KB Output is correct
37 Correct 6 ms 5980 KB Output is correct
38 Correct 6 ms 5576 KB Output is correct
39 Correct 6 ms 5724 KB Output is correct
40 Correct 6 ms 5980 KB Output is correct
41 Correct 6 ms 5712 KB Output is correct
42 Correct 10 ms 9052 KB Output is correct
43 Correct 9 ms 9560 KB Output is correct
44 Correct 9 ms 8284 KB Output is correct
45 Correct 10 ms 10100 KB Output is correct
46 Correct 5 ms 3160 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 604 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 1 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 0 ms 348 KB Output is correct
15 Correct 1 ms 600 KB Output is correct
16 Correct 1 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 1 ms 600 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 0 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 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 1 ms 600 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 0 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 604 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 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 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 604 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 696 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 700 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 1 ms 660 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 1 ms 600 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 1 ms 1116 KB Output is correct
60 Correct 1 ms 1116 KB Output is correct
61 Correct 2 ms 860 KB Output is correct
62 Correct 1 ms 1472 KB Output is correct
63 Correct 1 ms 1372 KB Output is correct
64 Correct 1 ms 1368 KB Output is correct
65 Correct 1 ms 1372 KB Output is correct
66 Correct 1 ms 1372 KB Output is correct
67 Correct 1 ms 1372 KB Output is correct
68 Correct 1 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 1372 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 636 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 860 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 600 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 10 ms 8776 KB Output is correct
93 Correct 8 ms 6928 KB Output is correct
94 Correct 1 ms 1112 KB Output is correct
95 Correct 8 ms 5464 KB Output is correct
96 Correct 9 ms 6236 KB Output is correct
97 Correct 2 ms 1372 KB Output is correct
98 Correct 4 ms 3420 KB Output is correct
99 Correct 4 ms 3420 KB Output is correct
100 Correct 2 ms 1372 KB Output is correct
101 Correct 6 ms 3420 KB Output is correct
102 Correct 6 ms 3420 KB Output is correct
103 Correct 11 ms 10332 KB Output is correct
104 Correct 9 ms 9564 KB Output is correct
105 Correct 9 ms 9308 KB Output is correct
106 Correct 11 ms 11796 KB Output is correct
107 Correct 11 ms 11916 KB Output is correct
108 Correct 12 ms 11908 KB Output is correct
109 Correct 10 ms 11928 KB Output is correct
110 Correct 11 ms 11868 KB Output is correct
111 Correct 15 ms 11868 KB Output is correct
112 Correct 11 ms 11868 KB Output is correct
113 Correct 11 ms 11884 KB Output is correct
114 Correct 9 ms 8540 KB Output is correct
115 Correct 9 ms 8468 KB Output is correct
116 Correct 9 ms 8464 KB Output is correct
117 Correct 9 ms 8540 KB Output is correct
118 Correct 13 ms 11356 KB Output is correct
119 Correct 14 ms 11056 KB Output is correct
120 Correct 12 ms 11612 KB Output is correct
121 Correct 13 ms 10844 KB Output is correct
122 Correct 10 ms 10588 KB Output is correct
123 Correct 10 ms 10844 KB Output is correct
124 Correct 4 ms 3164 KB Output is correct
125 Correct 6 ms 5980 KB Output is correct
126 Correct 6 ms 5576 KB Output is correct
127 Correct 6 ms 5724 KB Output is correct
128 Correct 6 ms 5980 KB Output is correct
129 Correct 6 ms 5712 KB Output is correct
130 Correct 10 ms 9052 KB Output is correct
131 Correct 9 ms 9560 KB Output is correct
132 Correct 9 ms 8284 KB Output is correct
133 Correct 10 ms 10100 KB Output is correct
134 Correct 5 ms 3160 KB Output is correct
135 Correct 2 ms 1628 KB Output is correct
136 Correct 9 ms 4868 KB Output is correct
137 Correct 7 ms 4696 KB Output is correct
138 Correct 2 ms 1884 KB Output is correct
139 Correct 6 ms 4788 KB Output is correct
140 Correct 7 ms 4700 KB Output is correct
141 Correct 3 ms 1984 KB Output is correct
142 Correct 6 ms 4784 KB Output is correct
143 Correct 7 ms 4700 KB Output is correct
144 Correct 0 ms 604 KB Output is correct
145 Correct 8 ms 4700 KB Output is correct
146 Correct 8 ms 4700 KB Output is correct
147 Correct 13 ms 10588 KB Output is correct
148 Correct 16 ms 12764 KB Output is correct
149 Correct 15 ms 12604 KB Output is correct
150 Correct 16 ms 16988 KB Output is correct
151 Correct 15 ms 17072 KB Output is correct
152 Correct 16 ms 17076 KB Output is correct
153 Correct 17 ms 16816 KB Output is correct
154 Correct 17 ms 16988 KB Output is correct
155 Correct 16 ms 17056 KB Output is correct
156 Correct 16 ms 16984 KB Output is correct
157 Correct 24 ms 16976 KB Output is correct
158 Correct 16 ms 12636 KB Output is correct
159 Correct 14 ms 12380 KB Output is correct
160 Correct 14 ms 12380 KB Output is correct
161 Correct 18 ms 12492 KB Output is correct
162 Correct 17 ms 15452 KB Output is correct
163 Correct 15 ms 15196 KB Output is correct
164 Correct 15 ms 16220 KB Output is correct
165 Correct 14 ms 15012 KB Output is correct
166 Correct 15 ms 15960 KB Output is correct
167 Correct 16 ms 15192 KB Output is correct
168 Correct 5 ms 4520 KB Output is correct
169 Correct 9 ms 8028 KB Output is correct
170 Correct 11 ms 8284 KB Output is correct
171 Correct 11 ms 8024 KB Output is correct
172 Correct 8 ms 7572 KB Output is correct
173 Correct 8 ms 8024 KB Output is correct
174 Correct 16 ms 11708 KB Output is correct
175 Correct 16 ms 14936 KB Output is correct
176 Correct 15 ms 14172 KB Output is correct
177 Correct 13 ms 11052 KB Output is correct
178 Correct 8 ms 4188 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 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 604 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 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 1 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 0 ms 348 KB Output is correct
15 Correct 1 ms 600 KB Output is correct
16 Correct 1 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 1 ms 600 KB Output is correct
20 Correct 0 ms 604 KB Output is correct
21 Correct 0 ms 604 KB Output is correct
22 Correct 1 ms 604 KB Output is correct
23 Correct 1 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 1 ms 600 KB Output is correct
27 Correct 0 ms 604 KB Output is correct
28 Correct 0 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 604 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 0 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 0 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 604 KB Output is correct
42 Correct 1 ms 604 KB Output is correct
43 Correct 0 ms 860 KB Output is correct
44 Correct 0 ms 604 KB Output is correct
45 Correct 1 ms 604 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 696 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 700 KB Output is correct
53 Correct 1 ms 604 KB Output is correct
54 Correct 1 ms 660 KB Output is correct
55 Correct 1 ms 604 KB Output is correct
56 Correct 1 ms 344 KB Output is correct
57 Correct 1 ms 600 KB Output is correct
58 Correct 1 ms 604 KB Output is correct
59 Correct 1 ms 1116 KB Output is correct
60 Correct 1 ms 1116 KB Output is correct
61 Correct 2 ms 860 KB Output is correct
62 Correct 1 ms 1472 KB Output is correct
63 Correct 1 ms 1372 KB Output is correct
64 Correct 1 ms 1368 KB Output is correct
65 Correct 1 ms 1372 KB Output is correct
66 Correct 1 ms 1372 KB Output is correct
67 Correct 1 ms 1372 KB Output is correct
68 Correct 1 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 1372 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 636 KB Output is correct
81 Correct 1 ms 860 KB Output is correct
82 Correct 1 ms 860 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 600 KB Output is correct
91 Correct 1 ms 604 KB Output is correct
92 Correct 10 ms 8776 KB Output is correct
93 Correct 8 ms 6928 KB Output is correct
94 Correct 1 ms 1112 KB Output is correct
95 Correct 8 ms 5464 KB Output is correct
96 Correct 9 ms 6236 KB Output is correct
97 Correct 2 ms 1372 KB Output is correct
98 Correct 4 ms 3420 KB Output is correct
99 Correct 4 ms 3420 KB Output is correct
100 Correct 2 ms 1372 KB Output is correct
101 Correct 6 ms 3420 KB Output is correct
102 Correct 6 ms 3420 KB Output is correct
103 Correct 11 ms 10332 KB Output is correct
104 Correct 9 ms 9564 KB Output is correct
105 Correct 9 ms 9308 KB Output is correct
106 Correct 11 ms 11796 KB Output is correct
107 Correct 11 ms 11916 KB Output is correct
108 Correct 12 ms 11908 KB Output is correct
109 Correct 10 ms 11928 KB Output is correct
110 Correct 11 ms 11868 KB Output is correct
111 Correct 15 ms 11868 KB Output is correct
112 Correct 11 ms 11868 KB Output is correct
113 Correct 11 ms 11884 KB Output is correct
114 Correct 9 ms 8540 KB Output is correct
115 Correct 9 ms 8468 KB Output is correct
116 Correct 9 ms 8464 KB Output is correct
117 Correct 9 ms 8540 KB Output is correct
118 Correct 13 ms 11356 KB Output is correct
119 Correct 14 ms 11056 KB Output is correct
120 Correct 12 ms 11612 KB Output is correct
121 Correct 13 ms 10844 KB Output is correct
122 Correct 10 ms 10588 KB Output is correct
123 Correct 10 ms 10844 KB Output is correct
124 Correct 4 ms 3164 KB Output is correct
125 Correct 6 ms 5980 KB Output is correct
126 Correct 6 ms 5576 KB Output is correct
127 Correct 6 ms 5724 KB Output is correct
128 Correct 6 ms 5980 KB Output is correct
129 Correct 6 ms 5712 KB Output is correct
130 Correct 10 ms 9052 KB Output is correct
131 Correct 9 ms 9560 KB Output is correct
132 Correct 9 ms 8284 KB Output is correct
133 Correct 10 ms 10100 KB Output is correct
134 Correct 5 ms 3160 KB Output is correct
135 Correct 2 ms 1628 KB Output is correct
136 Correct 9 ms 4868 KB Output is correct
137 Correct 7 ms 4696 KB Output is correct
138 Correct 2 ms 1884 KB Output is correct
139 Correct 6 ms 4788 KB Output is correct
140 Correct 7 ms 4700 KB Output is correct
141 Correct 3 ms 1984 KB Output is correct
142 Correct 6 ms 4784 KB Output is correct
143 Correct 7 ms 4700 KB Output is correct
144 Correct 0 ms 604 KB Output is correct
145 Correct 8 ms 4700 KB Output is correct
146 Correct 8 ms 4700 KB Output is correct
147 Correct 13 ms 10588 KB Output is correct
148 Correct 16 ms 12764 KB Output is correct
149 Correct 15 ms 12604 KB Output is correct
150 Correct 16 ms 16988 KB Output is correct
151 Correct 15 ms 17072 KB Output is correct
152 Correct 16 ms 17076 KB Output is correct
153 Correct 17 ms 16816 KB Output is correct
154 Correct 17 ms 16988 KB Output is correct
155 Correct 16 ms 17056 KB Output is correct
156 Correct 16 ms 16984 KB Output is correct
157 Correct 24 ms 16976 KB Output is correct
158 Correct 16 ms 12636 KB Output is correct
159 Correct 14 ms 12380 KB Output is correct
160 Correct 14 ms 12380 KB Output is correct
161 Correct 18 ms 12492 KB Output is correct
162 Correct 17 ms 15452 KB Output is correct
163 Correct 15 ms 15196 KB Output is correct
164 Correct 15 ms 16220 KB Output is correct
165 Correct 14 ms 15012 KB Output is correct
166 Correct 15 ms 15960 KB Output is correct
167 Correct 16 ms 15192 KB Output is correct
168 Correct 5 ms 4520 KB Output is correct
169 Correct 9 ms 8028 KB Output is correct
170 Correct 11 ms 8284 KB Output is correct
171 Correct 11 ms 8024 KB Output is correct
172 Correct 8 ms 7572 KB Output is correct
173 Correct 8 ms 8024 KB Output is correct
174 Correct 16 ms 11708 KB Output is correct
175 Correct 16 ms 14936 KB Output is correct
176 Correct 15 ms 14172 KB Output is correct
177 Correct 13 ms 11052 KB Output is correct
178 Correct 8 ms 4188 KB Output is correct
179 Correct 26 ms 20320 KB Output is correct
180 Correct 102 ms 75600 KB Output is correct
181 Correct 112 ms 75600 KB Output is correct
182 Correct 27 ms 20052 KB Output is correct
183 Correct 197 ms 75424 KB Output is correct
184 Correct 122 ms 75600 KB Output is correct
185 Correct 79 ms 55380 KB Output is correct
186 Correct 118 ms 75620 KB Output is correct
187 Correct 109 ms 75480 KB Output is correct
188 Correct 71 ms 39760 KB Output is correct
189 Correct 133 ms 75600 KB Output is correct
190 Correct 146 ms 75816 KB Output is correct
191 Correct 245 ms 159568 KB Output is correct
192 Correct 243 ms 166740 KB Output is correct
193 Correct 244 ms 191372 KB Output is correct
194 Correct 292 ms 286800 KB Output is correct
195 Correct 304 ms 286964 KB Output is correct
196 Correct 378 ms 286800 KB Output is correct
197 Correct 312 ms 286800 KB Output is correct
198 Correct 313 ms 286936 KB Output is correct
199 Correct 322 ms 286800 KB Output is correct
200 Correct 304 ms 286800 KB Output is correct
201 Correct 303 ms 286820 KB Output is correct
202 Correct 266 ms 208340 KB Output is correct
203 Correct 260 ms 208176 KB Output is correct
204 Correct 281 ms 207784 KB Output is correct
205 Correct 263 ms 207812 KB Output is correct
206 Correct 335 ms 250112 KB Output is correct
207 Correct 289 ms 252700 KB Output is correct
208 Correct 258 ms 239956 KB Output is correct
209 Correct 314 ms 256592 KB Output is correct
210 Correct 273 ms 255568 KB Output is correct
211 Correct 275 ms 271184 KB Output is correct
212 Correct 82 ms 65108 KB Output is correct
213 Correct 154 ms 131464 KB Output is correct
214 Correct 153 ms 124492 KB Output is correct
215 Correct 166 ms 133968 KB Output is correct
216 Correct 143 ms 122152 KB Output is correct
217 Correct 152 ms 124088 KB Output is correct
218 Correct 306 ms 241772 KB Output is correct
219 Correct 294 ms 237136 KB Output is correct
220 Correct 289 ms 217680 KB Output is correct
221 Correct 318 ms 239156 KB Output is correct
222 Correct 88 ms 63312 KB Output is correct