# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
1075627 |
2024-08-26T08:05:15 Z |
anton |
Toy (CEOI24_toy) |
C++17 |
|
753 ms |
400064 KB |
#include<bits/stdc++.h>
using namespace std;
#define pii pair<int, int>
int W, H, K, L;
const int MAX_N = 2500;
int dist_dir[4][MAX_N][MAX_N];
char cont[MAX_N][MAX_N];
struct Grid{
int a, b;
vector<vector<pii>> true_name;
Grid(int _a, int _b){
a= _a;
b= _b;
true_name.resize(a, vector<pii>(b));
for(int i = 0; i<a; i++){
for(int j = 0; j<b;j++){
true_name[i][j] = {i, j};
}
}
}
Grid flip(){
Grid res(b, a);
for(int i = 0; i<a; i++){
for(int j = 0; j<b; j++){
res.true_name[j][a-i-1] = true_name[i][j];
}
}
return res;
}
void calc_dist(int dir_id){
for(int i = 0; i<a; i++){
int streak= 0;
for(int j = 0; j<b; j++){
pii real = true_name[i][j];
if(cont[real.first][real.second] == 'X'){
streak = 0;
}
else{
streak++;
}
dist_dir[dir_id][real.first][real.second] = streak;
}
}
}
};
int get_inter_len(pii a, pii b, int dir){
int res = min(dist_dir[dir][a.first][a.second], dist_dir[dir][b.first][b.second]) + min(dist_dir[dir+2][a.first][a.second], dist_dir[dir+2][b.first][b.second])-1;
return res;
}
vector<pii> get_adj(pii pos){
vector<pii> res;
if(pos.first>0){
pii other = {pos.first-1, pos.second};
if(get_inter_len(pos, other, 0)>=K){
res.push_back(other);
}
}
if(pos.first<H-1){
pii other = {pos.first+1, pos.second};
if(get_inter_len(pos, other, 0)>=K){
res.push_back(other);
}
}
if(pos.second>0){
pii other = {pos.first, pos.second-1};
if(get_inter_len(pos, other, 1)>=L){
res.push_back(other);
}
}
if(pos.second<W-1){
pii other = {pos.first, pos.second+1};
if(get_inter_len(pos, other, 1)>=L){
res.push_back(other);
}
}
return res;
}
bool dfs(vector<vector<bool>>& vis, pii cur_pos){
vis[cur_pos.first][cur_pos.second] = true;
if(cont[cur_pos.first][cur_pos.second] == '*'){
return true;
}
for(auto e: get_adj(cur_pos)){
if(!vis[e.first][e.second]){
if(dfs(vis, e)){
return true;
}
}
}
return false;
}
signed main(){
cin>>W>>H>>K>>L;
pii h, v;
cin>>h.second>>h.first>>v.second>>v.first;
pii init_pos = {h.first, v.second};
Grid grid(H, W);
for(int i = 0; i<H; i++){
for(int j = 0; j<W; j++){
cin>>cont[i][j];
}
}
for(int k= 0; k<4; k++){
grid.calc_dist(k);
grid = grid.flip();
}
vector<vector<bool>> vis(H, vector<bool>(W));
if(dfs(vis, init_pos)){
cout<<"YES"<<endl;
return 0;
}
else{
cout<<"NO"<<endl;
return 0;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 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 |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1372 KB |
Output is correct |
6 |
Correct |
1 ms |
1112 KB |
Output is correct |
7 |
Correct |
1 ms |
1372 KB |
Output is correct |
8 |
Correct |
1 ms |
1372 KB |
Output is correct |
9 |
Correct |
1 ms |
1116 KB |
Output is correct |
10 |
Correct |
1 ms |
1468 KB |
Output is correct |
11 |
Correct |
1 ms |
1372 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
1372 KB |
Output is correct |
14 |
Correct |
1 ms |
1372 KB |
Output is correct |
15 |
Correct |
1 ms |
1628 KB |
Output is correct |
16 |
Correct |
1 ms |
1624 KB |
Output is correct |
17 |
Correct |
1 ms |
1372 KB |
Output is correct |
18 |
Correct |
1 ms |
1628 KB |
Output is correct |
19 |
Correct |
1 ms |
1628 KB |
Output is correct |
20 |
Correct |
1 ms |
1628 KB |
Output is correct |
21 |
Correct |
1 ms |
1720 KB |
Output is correct |
22 |
Correct |
1 ms |
1624 KB |
Output is correct |
23 |
Correct |
1 ms |
1624 KB |
Output is correct |
24 |
Correct |
1 ms |
1628 KB |
Output is correct |
25 |
Correct |
1 ms |
1628 KB |
Output is correct |
26 |
Correct |
1 ms |
1628 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
1 ms |
1628 KB |
Output is correct |
29 |
Correct |
1 ms |
1628 KB |
Output is correct |
30 |
Correct |
1 ms |
1372 KB |
Output is correct |
31 |
Correct |
1 ms |
1624 KB |
Output is correct |
32 |
Correct |
1 ms |
1628 KB |
Output is correct |
33 |
Correct |
1 ms |
1688 KB |
Output is correct |
34 |
Correct |
1 ms |
1372 KB |
Output is correct |
35 |
Correct |
1 ms |
1372 KB |
Output is correct |
36 |
Correct |
1 ms |
1372 KB |
Output is correct |
37 |
Correct |
1 ms |
1292 KB |
Output is correct |
38 |
Correct |
1 ms |
1372 KB |
Output is correct |
39 |
Correct |
1 ms |
1372 KB |
Output is correct |
40 |
Correct |
1 ms |
1372 KB |
Output is correct |
41 |
Correct |
1 ms |
1628 KB |
Output is correct |
42 |
Correct |
1 ms |
1372 KB |
Output is correct |
43 |
Correct |
1 ms |
1628 KB |
Output is correct |
44 |
Correct |
1 ms |
1372 KB |
Output is correct |
45 |
Correct |
1 ms |
1628 KB |
Output is correct |
46 |
Correct |
1 ms |
1116 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 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 |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1372 KB |
Output is correct |
6 |
Correct |
1 ms |
1112 KB |
Output is correct |
7 |
Correct |
1 ms |
1372 KB |
Output is correct |
8 |
Correct |
1 ms |
1372 KB |
Output is correct |
9 |
Correct |
1 ms |
1116 KB |
Output is correct |
10 |
Correct |
1 ms |
1468 KB |
Output is correct |
11 |
Correct |
1 ms |
1372 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
1372 KB |
Output is correct |
14 |
Correct |
1 ms |
1372 KB |
Output is correct |
15 |
Correct |
1 ms |
1628 KB |
Output is correct |
16 |
Correct |
1 ms |
1624 KB |
Output is correct |
17 |
Correct |
1 ms |
1372 KB |
Output is correct |
18 |
Correct |
1 ms |
1628 KB |
Output is correct |
19 |
Correct |
1 ms |
1628 KB |
Output is correct |
20 |
Correct |
1 ms |
1628 KB |
Output is correct |
21 |
Correct |
1 ms |
1720 KB |
Output is correct |
22 |
Correct |
1 ms |
1624 KB |
Output is correct |
23 |
Correct |
1 ms |
1624 KB |
Output is correct |
24 |
Correct |
1 ms |
1628 KB |
Output is correct |
25 |
Correct |
1 ms |
1628 KB |
Output is correct |
26 |
Correct |
1 ms |
1628 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
1 ms |
1628 KB |
Output is correct |
29 |
Correct |
1 ms |
1628 KB |
Output is correct |
30 |
Correct |
1 ms |
1372 KB |
Output is correct |
31 |
Correct |
1 ms |
1624 KB |
Output is correct |
32 |
Correct |
1 ms |
1628 KB |
Output is correct |
33 |
Correct |
1 ms |
1688 KB |
Output is correct |
34 |
Correct |
1 ms |
1372 KB |
Output is correct |
35 |
Correct |
1 ms |
1372 KB |
Output is correct |
36 |
Correct |
1 ms |
1372 KB |
Output is correct |
37 |
Correct |
1 ms |
1292 KB |
Output is correct |
38 |
Correct |
1 ms |
1372 KB |
Output is correct |
39 |
Correct |
1 ms |
1372 KB |
Output is correct |
40 |
Correct |
1 ms |
1372 KB |
Output is correct |
41 |
Correct |
1 ms |
1628 KB |
Output is correct |
42 |
Correct |
1 ms |
1372 KB |
Output is correct |
43 |
Correct |
1 ms |
1628 KB |
Output is correct |
44 |
Correct |
1 ms |
1372 KB |
Output is correct |
45 |
Correct |
1 ms |
1628 KB |
Output is correct |
46 |
Correct |
1 ms |
1116 KB |
Output is correct |
47 |
Correct |
1 ms |
1116 KB |
Output is correct |
48 |
Correct |
1 ms |
2204 KB |
Output is correct |
49 |
Correct |
1 ms |
2396 KB |
Output is correct |
50 |
Correct |
2 ms |
2140 KB |
Output is correct |
51 |
Correct |
1 ms |
2392 KB |
Output is correct |
52 |
Correct |
1 ms |
2140 KB |
Output is correct |
53 |
Correct |
1 ms |
1372 KB |
Output is correct |
54 |
Correct |
1 ms |
2396 KB |
Output is correct |
55 |
Correct |
2 ms |
2396 KB |
Output is correct |
56 |
Correct |
1 ms |
2140 KB |
Output is correct |
57 |
Correct |
2 ms |
2244 KB |
Output is correct |
58 |
Correct |
1 ms |
2140 KB |
Output is correct |
59 |
Correct |
2 ms |
2908 KB |
Output is correct |
60 |
Correct |
2 ms |
2908 KB |
Output is correct |
61 |
Correct |
2 ms |
2652 KB |
Output is correct |
62 |
Correct |
2 ms |
3420 KB |
Output is correct |
63 |
Correct |
2 ms |
3420 KB |
Output is correct |
64 |
Correct |
3 ms |
3420 KB |
Output is correct |
65 |
Correct |
3 ms |
3420 KB |
Output is correct |
66 |
Correct |
3 ms |
3420 KB |
Output is correct |
67 |
Correct |
3 ms |
3420 KB |
Output is correct |
68 |
Correct |
3 ms |
3416 KB |
Output is correct |
69 |
Correct |
3 ms |
3420 KB |
Output is correct |
70 |
Correct |
2 ms |
2908 KB |
Output is correct |
71 |
Correct |
2 ms |
2908 KB |
Output is correct |
72 |
Correct |
2 ms |
2904 KB |
Output is correct |
73 |
Correct |
3 ms |
2908 KB |
Output is correct |
74 |
Correct |
2 ms |
2652 KB |
Output is correct |
75 |
Correct |
3 ms |
2908 KB |
Output is correct |
76 |
Correct |
3 ms |
3420 KB |
Output is correct |
77 |
Correct |
3 ms |
3164 KB |
Output is correct |
78 |
Correct |
2 ms |
2744 KB |
Output is correct |
79 |
Correct |
2 ms |
2904 KB |
Output is correct |
80 |
Correct |
1 ms |
2140 KB |
Output is correct |
81 |
Correct |
2 ms |
2396 KB |
Output is correct |
82 |
Correct |
2 ms |
2396 KB |
Output is correct |
83 |
Correct |
1 ms |
2396 KB |
Output is correct |
84 |
Correct |
2 ms |
2396 KB |
Output is correct |
85 |
Correct |
2 ms |
2444 KB |
Output is correct |
86 |
Correct |
2 ms |
2908 KB |
Output is correct |
87 |
Correct |
2 ms |
2908 KB |
Output is correct |
88 |
Correct |
2 ms |
2652 KB |
Output is correct |
89 |
Correct |
2 ms |
2652 KB |
Output is correct |
90 |
Correct |
1 ms |
2140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
1368 KB |
Output is correct |
4 |
Correct |
18 ms |
15300 KB |
Output is correct |
5 |
Correct |
9 ms |
9664 KB |
Output is correct |
6 |
Correct |
2 ms |
2140 KB |
Output is correct |
7 |
Correct |
12 ms |
10436 KB |
Output is correct |
8 |
Correct |
8 ms |
9156 KB |
Output is correct |
9 |
Correct |
3 ms |
3420 KB |
Output is correct |
10 |
Correct |
7 ms |
8824 KB |
Output is correct |
11 |
Correct |
7 ms |
8716 KB |
Output is correct |
12 |
Correct |
3 ms |
5868 KB |
Output is correct |
13 |
Correct |
7 ms |
8976 KB |
Output is correct |
14 |
Correct |
7 ms |
8784 KB |
Output is correct |
15 |
Correct |
22 ms |
18732 KB |
Output is correct |
16 |
Correct |
25 ms |
17232 KB |
Output is correct |
17 |
Correct |
25 ms |
17500 KB |
Output is correct |
18 |
Correct |
28 ms |
20788 KB |
Output is correct |
19 |
Correct |
24 ms |
20672 KB |
Output is correct |
20 |
Correct |
24 ms |
20864 KB |
Output is correct |
21 |
Correct |
24 ms |
20672 KB |
Output is correct |
22 |
Correct |
24 ms |
20676 KB |
Output is correct |
23 |
Correct |
23 ms |
20716 KB |
Output is correct |
24 |
Correct |
23 ms |
20676 KB |
Output is correct |
25 |
Correct |
23 ms |
20796 KB |
Output is correct |
26 |
Correct |
18 ms |
15812 KB |
Output is correct |
27 |
Correct |
25 ms |
15940 KB |
Output is correct |
28 |
Correct |
19 ms |
16068 KB |
Output is correct |
29 |
Correct |
22 ms |
15912 KB |
Output is correct |
30 |
Correct |
8 ms |
8920 KB |
Output is correct |
31 |
Correct |
23 ms |
19600 KB |
Output is correct |
32 |
Correct |
24 ms |
20380 KB |
Output is correct |
33 |
Correct |
22 ms |
19056 KB |
Output is correct |
34 |
Correct |
16 ms |
14928 KB |
Output is correct |
35 |
Correct |
13 ms |
12868 KB |
Output is correct |
36 |
Correct |
6 ms |
8280 KB |
Output is correct |
37 |
Correct |
12 ms |
12020 KB |
Output is correct |
38 |
Correct |
12 ms |
11608 KB |
Output is correct |
39 |
Correct |
11 ms |
11564 KB |
Output is correct |
40 |
Correct |
12 ms |
12104 KB |
Output is correct |
41 |
Correct |
12 ms |
11604 KB |
Output is correct |
42 |
Correct |
17 ms |
12588 KB |
Output is correct |
43 |
Correct |
22 ms |
17264 KB |
Output is correct |
44 |
Correct |
17 ms |
15296 KB |
Output is correct |
45 |
Correct |
14 ms |
12484 KB |
Output is correct |
46 |
Correct |
7 ms |
8256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 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 |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1372 KB |
Output is correct |
6 |
Correct |
1 ms |
1112 KB |
Output is correct |
7 |
Correct |
1 ms |
1372 KB |
Output is correct |
8 |
Correct |
1 ms |
1372 KB |
Output is correct |
9 |
Correct |
1 ms |
1116 KB |
Output is correct |
10 |
Correct |
1 ms |
1468 KB |
Output is correct |
11 |
Correct |
1 ms |
1372 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
1372 KB |
Output is correct |
14 |
Correct |
1 ms |
1372 KB |
Output is correct |
15 |
Correct |
1 ms |
1628 KB |
Output is correct |
16 |
Correct |
1 ms |
1624 KB |
Output is correct |
17 |
Correct |
1 ms |
1372 KB |
Output is correct |
18 |
Correct |
1 ms |
1628 KB |
Output is correct |
19 |
Correct |
1 ms |
1628 KB |
Output is correct |
20 |
Correct |
1 ms |
1628 KB |
Output is correct |
21 |
Correct |
1 ms |
1720 KB |
Output is correct |
22 |
Correct |
1 ms |
1624 KB |
Output is correct |
23 |
Correct |
1 ms |
1624 KB |
Output is correct |
24 |
Correct |
1 ms |
1628 KB |
Output is correct |
25 |
Correct |
1 ms |
1628 KB |
Output is correct |
26 |
Correct |
1 ms |
1628 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
1 ms |
1628 KB |
Output is correct |
29 |
Correct |
1 ms |
1628 KB |
Output is correct |
30 |
Correct |
1 ms |
1372 KB |
Output is correct |
31 |
Correct |
1 ms |
1624 KB |
Output is correct |
32 |
Correct |
1 ms |
1628 KB |
Output is correct |
33 |
Correct |
1 ms |
1688 KB |
Output is correct |
34 |
Correct |
1 ms |
1372 KB |
Output is correct |
35 |
Correct |
1 ms |
1372 KB |
Output is correct |
36 |
Correct |
1 ms |
1372 KB |
Output is correct |
37 |
Correct |
1 ms |
1292 KB |
Output is correct |
38 |
Correct |
1 ms |
1372 KB |
Output is correct |
39 |
Correct |
1 ms |
1372 KB |
Output is correct |
40 |
Correct |
1 ms |
1372 KB |
Output is correct |
41 |
Correct |
1 ms |
1628 KB |
Output is correct |
42 |
Correct |
1 ms |
1372 KB |
Output is correct |
43 |
Correct |
1 ms |
1628 KB |
Output is correct |
44 |
Correct |
1 ms |
1372 KB |
Output is correct |
45 |
Correct |
1 ms |
1628 KB |
Output is correct |
46 |
Correct |
1 ms |
1116 KB |
Output is correct |
47 |
Correct |
1 ms |
1116 KB |
Output is correct |
48 |
Correct |
1 ms |
2204 KB |
Output is correct |
49 |
Correct |
1 ms |
2396 KB |
Output is correct |
50 |
Correct |
2 ms |
2140 KB |
Output is correct |
51 |
Correct |
1 ms |
2392 KB |
Output is correct |
52 |
Correct |
1 ms |
2140 KB |
Output is correct |
53 |
Correct |
1 ms |
1372 KB |
Output is correct |
54 |
Correct |
1 ms |
2396 KB |
Output is correct |
55 |
Correct |
2 ms |
2396 KB |
Output is correct |
56 |
Correct |
1 ms |
2140 KB |
Output is correct |
57 |
Correct |
2 ms |
2244 KB |
Output is correct |
58 |
Correct |
1 ms |
2140 KB |
Output is correct |
59 |
Correct |
2 ms |
2908 KB |
Output is correct |
60 |
Correct |
2 ms |
2908 KB |
Output is correct |
61 |
Correct |
2 ms |
2652 KB |
Output is correct |
62 |
Correct |
2 ms |
3420 KB |
Output is correct |
63 |
Correct |
2 ms |
3420 KB |
Output is correct |
64 |
Correct |
3 ms |
3420 KB |
Output is correct |
65 |
Correct |
3 ms |
3420 KB |
Output is correct |
66 |
Correct |
3 ms |
3420 KB |
Output is correct |
67 |
Correct |
3 ms |
3420 KB |
Output is correct |
68 |
Correct |
3 ms |
3416 KB |
Output is correct |
69 |
Correct |
3 ms |
3420 KB |
Output is correct |
70 |
Correct |
2 ms |
2908 KB |
Output is correct |
71 |
Correct |
2 ms |
2908 KB |
Output is correct |
72 |
Correct |
2 ms |
2904 KB |
Output is correct |
73 |
Correct |
3 ms |
2908 KB |
Output is correct |
74 |
Correct |
2 ms |
2652 KB |
Output is correct |
75 |
Correct |
3 ms |
2908 KB |
Output is correct |
76 |
Correct |
3 ms |
3420 KB |
Output is correct |
77 |
Correct |
3 ms |
3164 KB |
Output is correct |
78 |
Correct |
2 ms |
2744 KB |
Output is correct |
79 |
Correct |
2 ms |
2904 KB |
Output is correct |
80 |
Correct |
1 ms |
2140 KB |
Output is correct |
81 |
Correct |
2 ms |
2396 KB |
Output is correct |
82 |
Correct |
2 ms |
2396 KB |
Output is correct |
83 |
Correct |
1 ms |
2396 KB |
Output is correct |
84 |
Correct |
2 ms |
2396 KB |
Output is correct |
85 |
Correct |
2 ms |
2444 KB |
Output is correct |
86 |
Correct |
2 ms |
2908 KB |
Output is correct |
87 |
Correct |
2 ms |
2908 KB |
Output is correct |
88 |
Correct |
2 ms |
2652 KB |
Output is correct |
89 |
Correct |
2 ms |
2652 KB |
Output is correct |
90 |
Correct |
1 ms |
2140 KB |
Output is correct |
91 |
Correct |
1 ms |
1368 KB |
Output is correct |
92 |
Correct |
18 ms |
15300 KB |
Output is correct |
93 |
Correct |
9 ms |
9664 KB |
Output is correct |
94 |
Correct |
2 ms |
2140 KB |
Output is correct |
95 |
Correct |
12 ms |
10436 KB |
Output is correct |
96 |
Correct |
8 ms |
9156 KB |
Output is correct |
97 |
Correct |
3 ms |
3420 KB |
Output is correct |
98 |
Correct |
7 ms |
8824 KB |
Output is correct |
99 |
Correct |
7 ms |
8716 KB |
Output is correct |
100 |
Correct |
3 ms |
5868 KB |
Output is correct |
101 |
Correct |
7 ms |
8976 KB |
Output is correct |
102 |
Correct |
7 ms |
8784 KB |
Output is correct |
103 |
Correct |
22 ms |
18732 KB |
Output is correct |
104 |
Correct |
25 ms |
17232 KB |
Output is correct |
105 |
Correct |
25 ms |
17500 KB |
Output is correct |
106 |
Correct |
28 ms |
20788 KB |
Output is correct |
107 |
Correct |
24 ms |
20672 KB |
Output is correct |
108 |
Correct |
24 ms |
20864 KB |
Output is correct |
109 |
Correct |
24 ms |
20672 KB |
Output is correct |
110 |
Correct |
24 ms |
20676 KB |
Output is correct |
111 |
Correct |
23 ms |
20716 KB |
Output is correct |
112 |
Correct |
23 ms |
20676 KB |
Output is correct |
113 |
Correct |
23 ms |
20796 KB |
Output is correct |
114 |
Correct |
18 ms |
15812 KB |
Output is correct |
115 |
Correct |
25 ms |
15940 KB |
Output is correct |
116 |
Correct |
19 ms |
16068 KB |
Output is correct |
117 |
Correct |
22 ms |
15912 KB |
Output is correct |
118 |
Correct |
8 ms |
8920 KB |
Output is correct |
119 |
Correct |
23 ms |
19600 KB |
Output is correct |
120 |
Correct |
24 ms |
20380 KB |
Output is correct |
121 |
Correct |
22 ms |
19056 KB |
Output is correct |
122 |
Correct |
16 ms |
14928 KB |
Output is correct |
123 |
Correct |
13 ms |
12868 KB |
Output is correct |
124 |
Correct |
6 ms |
8280 KB |
Output is correct |
125 |
Correct |
12 ms |
12020 KB |
Output is correct |
126 |
Correct |
12 ms |
11608 KB |
Output is correct |
127 |
Correct |
11 ms |
11564 KB |
Output is correct |
128 |
Correct |
12 ms |
12104 KB |
Output is correct |
129 |
Correct |
12 ms |
11604 KB |
Output is correct |
130 |
Correct |
17 ms |
12588 KB |
Output is correct |
131 |
Correct |
22 ms |
17264 KB |
Output is correct |
132 |
Correct |
17 ms |
15296 KB |
Output is correct |
133 |
Correct |
14 ms |
12484 KB |
Output is correct |
134 |
Correct |
7 ms |
8256 KB |
Output is correct |
135 |
Correct |
4 ms |
5804 KB |
Output is correct |
136 |
Correct |
10 ms |
11224 KB |
Output is correct |
137 |
Correct |
10 ms |
11296 KB |
Output is correct |
138 |
Correct |
4 ms |
5180 KB |
Output is correct |
139 |
Correct |
9 ms |
11252 KB |
Output is correct |
140 |
Correct |
10 ms |
11224 KB |
Output is correct |
141 |
Correct |
5 ms |
8264 KB |
Output is correct |
142 |
Correct |
10 ms |
11088 KB |
Output is correct |
143 |
Correct |
13 ms |
11220 KB |
Output is correct |
144 |
Correct |
1 ms |
1116 KB |
Output is correct |
145 |
Correct |
10 ms |
11224 KB |
Output is correct |
146 |
Correct |
10 ms |
11188 KB |
Output is correct |
147 |
Correct |
30 ms |
19216 KB |
Output is correct |
148 |
Correct |
30 ms |
22244 KB |
Output is correct |
149 |
Correct |
29 ms |
21704 KB |
Output is correct |
150 |
Correct |
34 ms |
28448 KB |
Output is correct |
151 |
Correct |
37 ms |
28492 KB |
Output is correct |
152 |
Correct |
36 ms |
28488 KB |
Output is correct |
153 |
Correct |
39 ms |
28236 KB |
Output is correct |
154 |
Correct |
34 ms |
28484 KB |
Output is correct |
155 |
Correct |
34 ms |
28488 KB |
Output is correct |
156 |
Correct |
34 ms |
28488 KB |
Output is correct |
157 |
Correct |
35 ms |
28488 KB |
Output is correct |
158 |
Correct |
30 ms |
21836 KB |
Output is correct |
159 |
Correct |
34 ms |
21616 KB |
Output is correct |
160 |
Correct |
33 ms |
21840 KB |
Output is correct |
161 |
Correct |
34 ms |
21584 KB |
Output is correct |
162 |
Correct |
24 ms |
21244 KB |
Output is correct |
163 |
Correct |
35 ms |
25632 KB |
Output is correct |
164 |
Correct |
15 ms |
13728 KB |
Output is correct |
165 |
Correct |
31 ms |
25264 KB |
Output is correct |
166 |
Correct |
21 ms |
19128 KB |
Output is correct |
167 |
Correct |
32 ms |
24096 KB |
Output is correct |
168 |
Correct |
10 ms |
10776 KB |
Output is correct |
169 |
Correct |
18 ms |
15200 KB |
Output is correct |
170 |
Correct |
26 ms |
15564 KB |
Output is correct |
171 |
Correct |
16 ms |
14876 KB |
Output is correct |
172 |
Correct |
15 ms |
14720 KB |
Output is correct |
173 |
Correct |
22 ms |
15340 KB |
Output is correct |
174 |
Correct |
19 ms |
17480 KB |
Output is correct |
175 |
Correct |
12 ms |
11224 KB |
Output is correct |
176 |
Correct |
16 ms |
14164 KB |
Output is correct |
177 |
Correct |
12 ms |
11348 KB |
Output is correct |
178 |
Correct |
9 ms |
10568 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 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 |
1624 KB |
Output is correct |
5 |
Correct |
1 ms |
1372 KB |
Output is correct |
6 |
Correct |
1 ms |
1112 KB |
Output is correct |
7 |
Correct |
1 ms |
1372 KB |
Output is correct |
8 |
Correct |
1 ms |
1372 KB |
Output is correct |
9 |
Correct |
1 ms |
1116 KB |
Output is correct |
10 |
Correct |
1 ms |
1468 KB |
Output is correct |
11 |
Correct |
1 ms |
1372 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
1 ms |
1372 KB |
Output is correct |
14 |
Correct |
1 ms |
1372 KB |
Output is correct |
15 |
Correct |
1 ms |
1628 KB |
Output is correct |
16 |
Correct |
1 ms |
1624 KB |
Output is correct |
17 |
Correct |
1 ms |
1372 KB |
Output is correct |
18 |
Correct |
1 ms |
1628 KB |
Output is correct |
19 |
Correct |
1 ms |
1628 KB |
Output is correct |
20 |
Correct |
1 ms |
1628 KB |
Output is correct |
21 |
Correct |
1 ms |
1720 KB |
Output is correct |
22 |
Correct |
1 ms |
1624 KB |
Output is correct |
23 |
Correct |
1 ms |
1624 KB |
Output is correct |
24 |
Correct |
1 ms |
1628 KB |
Output is correct |
25 |
Correct |
1 ms |
1628 KB |
Output is correct |
26 |
Correct |
1 ms |
1628 KB |
Output is correct |
27 |
Correct |
1 ms |
1628 KB |
Output is correct |
28 |
Correct |
1 ms |
1628 KB |
Output is correct |
29 |
Correct |
1 ms |
1628 KB |
Output is correct |
30 |
Correct |
1 ms |
1372 KB |
Output is correct |
31 |
Correct |
1 ms |
1624 KB |
Output is correct |
32 |
Correct |
1 ms |
1628 KB |
Output is correct |
33 |
Correct |
1 ms |
1688 KB |
Output is correct |
34 |
Correct |
1 ms |
1372 KB |
Output is correct |
35 |
Correct |
1 ms |
1372 KB |
Output is correct |
36 |
Correct |
1 ms |
1372 KB |
Output is correct |
37 |
Correct |
1 ms |
1292 KB |
Output is correct |
38 |
Correct |
1 ms |
1372 KB |
Output is correct |
39 |
Correct |
1 ms |
1372 KB |
Output is correct |
40 |
Correct |
1 ms |
1372 KB |
Output is correct |
41 |
Correct |
1 ms |
1628 KB |
Output is correct |
42 |
Correct |
1 ms |
1372 KB |
Output is correct |
43 |
Correct |
1 ms |
1628 KB |
Output is correct |
44 |
Correct |
1 ms |
1372 KB |
Output is correct |
45 |
Correct |
1 ms |
1628 KB |
Output is correct |
46 |
Correct |
1 ms |
1116 KB |
Output is correct |
47 |
Correct |
1 ms |
1116 KB |
Output is correct |
48 |
Correct |
1 ms |
2204 KB |
Output is correct |
49 |
Correct |
1 ms |
2396 KB |
Output is correct |
50 |
Correct |
2 ms |
2140 KB |
Output is correct |
51 |
Correct |
1 ms |
2392 KB |
Output is correct |
52 |
Correct |
1 ms |
2140 KB |
Output is correct |
53 |
Correct |
1 ms |
1372 KB |
Output is correct |
54 |
Correct |
1 ms |
2396 KB |
Output is correct |
55 |
Correct |
2 ms |
2396 KB |
Output is correct |
56 |
Correct |
1 ms |
2140 KB |
Output is correct |
57 |
Correct |
2 ms |
2244 KB |
Output is correct |
58 |
Correct |
1 ms |
2140 KB |
Output is correct |
59 |
Correct |
2 ms |
2908 KB |
Output is correct |
60 |
Correct |
2 ms |
2908 KB |
Output is correct |
61 |
Correct |
2 ms |
2652 KB |
Output is correct |
62 |
Correct |
2 ms |
3420 KB |
Output is correct |
63 |
Correct |
2 ms |
3420 KB |
Output is correct |
64 |
Correct |
3 ms |
3420 KB |
Output is correct |
65 |
Correct |
3 ms |
3420 KB |
Output is correct |
66 |
Correct |
3 ms |
3420 KB |
Output is correct |
67 |
Correct |
3 ms |
3420 KB |
Output is correct |
68 |
Correct |
3 ms |
3416 KB |
Output is correct |
69 |
Correct |
3 ms |
3420 KB |
Output is correct |
70 |
Correct |
2 ms |
2908 KB |
Output is correct |
71 |
Correct |
2 ms |
2908 KB |
Output is correct |
72 |
Correct |
2 ms |
2904 KB |
Output is correct |
73 |
Correct |
3 ms |
2908 KB |
Output is correct |
74 |
Correct |
2 ms |
2652 KB |
Output is correct |
75 |
Correct |
3 ms |
2908 KB |
Output is correct |
76 |
Correct |
3 ms |
3420 KB |
Output is correct |
77 |
Correct |
3 ms |
3164 KB |
Output is correct |
78 |
Correct |
2 ms |
2744 KB |
Output is correct |
79 |
Correct |
2 ms |
2904 KB |
Output is correct |
80 |
Correct |
1 ms |
2140 KB |
Output is correct |
81 |
Correct |
2 ms |
2396 KB |
Output is correct |
82 |
Correct |
2 ms |
2396 KB |
Output is correct |
83 |
Correct |
1 ms |
2396 KB |
Output is correct |
84 |
Correct |
2 ms |
2396 KB |
Output is correct |
85 |
Correct |
2 ms |
2444 KB |
Output is correct |
86 |
Correct |
2 ms |
2908 KB |
Output is correct |
87 |
Correct |
2 ms |
2908 KB |
Output is correct |
88 |
Correct |
2 ms |
2652 KB |
Output is correct |
89 |
Correct |
2 ms |
2652 KB |
Output is correct |
90 |
Correct |
1 ms |
2140 KB |
Output is correct |
91 |
Correct |
1 ms |
1368 KB |
Output is correct |
92 |
Correct |
18 ms |
15300 KB |
Output is correct |
93 |
Correct |
9 ms |
9664 KB |
Output is correct |
94 |
Correct |
2 ms |
2140 KB |
Output is correct |
95 |
Correct |
12 ms |
10436 KB |
Output is correct |
96 |
Correct |
8 ms |
9156 KB |
Output is correct |
97 |
Correct |
3 ms |
3420 KB |
Output is correct |
98 |
Correct |
7 ms |
8824 KB |
Output is correct |
99 |
Correct |
7 ms |
8716 KB |
Output is correct |
100 |
Correct |
3 ms |
5868 KB |
Output is correct |
101 |
Correct |
7 ms |
8976 KB |
Output is correct |
102 |
Correct |
7 ms |
8784 KB |
Output is correct |
103 |
Correct |
22 ms |
18732 KB |
Output is correct |
104 |
Correct |
25 ms |
17232 KB |
Output is correct |
105 |
Correct |
25 ms |
17500 KB |
Output is correct |
106 |
Correct |
28 ms |
20788 KB |
Output is correct |
107 |
Correct |
24 ms |
20672 KB |
Output is correct |
108 |
Correct |
24 ms |
20864 KB |
Output is correct |
109 |
Correct |
24 ms |
20672 KB |
Output is correct |
110 |
Correct |
24 ms |
20676 KB |
Output is correct |
111 |
Correct |
23 ms |
20716 KB |
Output is correct |
112 |
Correct |
23 ms |
20676 KB |
Output is correct |
113 |
Correct |
23 ms |
20796 KB |
Output is correct |
114 |
Correct |
18 ms |
15812 KB |
Output is correct |
115 |
Correct |
25 ms |
15940 KB |
Output is correct |
116 |
Correct |
19 ms |
16068 KB |
Output is correct |
117 |
Correct |
22 ms |
15912 KB |
Output is correct |
118 |
Correct |
8 ms |
8920 KB |
Output is correct |
119 |
Correct |
23 ms |
19600 KB |
Output is correct |
120 |
Correct |
24 ms |
20380 KB |
Output is correct |
121 |
Correct |
22 ms |
19056 KB |
Output is correct |
122 |
Correct |
16 ms |
14928 KB |
Output is correct |
123 |
Correct |
13 ms |
12868 KB |
Output is correct |
124 |
Correct |
6 ms |
8280 KB |
Output is correct |
125 |
Correct |
12 ms |
12020 KB |
Output is correct |
126 |
Correct |
12 ms |
11608 KB |
Output is correct |
127 |
Correct |
11 ms |
11564 KB |
Output is correct |
128 |
Correct |
12 ms |
12104 KB |
Output is correct |
129 |
Correct |
12 ms |
11604 KB |
Output is correct |
130 |
Correct |
17 ms |
12588 KB |
Output is correct |
131 |
Correct |
22 ms |
17264 KB |
Output is correct |
132 |
Correct |
17 ms |
15296 KB |
Output is correct |
133 |
Correct |
14 ms |
12484 KB |
Output is correct |
134 |
Correct |
7 ms |
8256 KB |
Output is correct |
135 |
Correct |
4 ms |
5804 KB |
Output is correct |
136 |
Correct |
10 ms |
11224 KB |
Output is correct |
137 |
Correct |
10 ms |
11296 KB |
Output is correct |
138 |
Correct |
4 ms |
5180 KB |
Output is correct |
139 |
Correct |
9 ms |
11252 KB |
Output is correct |
140 |
Correct |
10 ms |
11224 KB |
Output is correct |
141 |
Correct |
5 ms |
8264 KB |
Output is correct |
142 |
Correct |
10 ms |
11088 KB |
Output is correct |
143 |
Correct |
13 ms |
11220 KB |
Output is correct |
144 |
Correct |
1 ms |
1116 KB |
Output is correct |
145 |
Correct |
10 ms |
11224 KB |
Output is correct |
146 |
Correct |
10 ms |
11188 KB |
Output is correct |
147 |
Correct |
30 ms |
19216 KB |
Output is correct |
148 |
Correct |
30 ms |
22244 KB |
Output is correct |
149 |
Correct |
29 ms |
21704 KB |
Output is correct |
150 |
Correct |
34 ms |
28448 KB |
Output is correct |
151 |
Correct |
37 ms |
28492 KB |
Output is correct |
152 |
Correct |
36 ms |
28488 KB |
Output is correct |
153 |
Correct |
39 ms |
28236 KB |
Output is correct |
154 |
Correct |
34 ms |
28484 KB |
Output is correct |
155 |
Correct |
34 ms |
28488 KB |
Output is correct |
156 |
Correct |
34 ms |
28488 KB |
Output is correct |
157 |
Correct |
35 ms |
28488 KB |
Output is correct |
158 |
Correct |
30 ms |
21836 KB |
Output is correct |
159 |
Correct |
34 ms |
21616 KB |
Output is correct |
160 |
Correct |
33 ms |
21840 KB |
Output is correct |
161 |
Correct |
34 ms |
21584 KB |
Output is correct |
162 |
Correct |
24 ms |
21244 KB |
Output is correct |
163 |
Correct |
35 ms |
25632 KB |
Output is correct |
164 |
Correct |
15 ms |
13728 KB |
Output is correct |
165 |
Correct |
31 ms |
25264 KB |
Output is correct |
166 |
Correct |
21 ms |
19128 KB |
Output is correct |
167 |
Correct |
32 ms |
24096 KB |
Output is correct |
168 |
Correct |
10 ms |
10776 KB |
Output is correct |
169 |
Correct |
18 ms |
15200 KB |
Output is correct |
170 |
Correct |
26 ms |
15564 KB |
Output is correct |
171 |
Correct |
16 ms |
14876 KB |
Output is correct |
172 |
Correct |
15 ms |
14720 KB |
Output is correct |
173 |
Correct |
22 ms |
15340 KB |
Output is correct |
174 |
Correct |
19 ms |
17480 KB |
Output is correct |
175 |
Correct |
12 ms |
11224 KB |
Output is correct |
176 |
Correct |
16 ms |
14164 KB |
Output is correct |
177 |
Correct |
12 ms |
11348 KB |
Output is correct |
178 |
Correct |
9 ms |
10568 KB |
Output is correct |
179 |
Correct |
42 ms |
34576 KB |
Output is correct |
180 |
Correct |
159 ms |
100296 KB |
Output is correct |
181 |
Correct |
173 ms |
100304 KB |
Output is correct |
182 |
Correct |
59 ms |
37596 KB |
Output is correct |
183 |
Correct |
170 ms |
100120 KB |
Output is correct |
184 |
Correct |
163 ms |
100308 KB |
Output is correct |
185 |
Correct |
112 ms |
77888 KB |
Output is correct |
186 |
Correct |
171 ms |
100220 KB |
Output is correct |
187 |
Correct |
168 ms |
100216 KB |
Output is correct |
188 |
Correct |
85 ms |
59636 KB |
Output is correct |
189 |
Correct |
165 ms |
100336 KB |
Output is correct |
190 |
Correct |
162 ms |
100304 KB |
Output is correct |
191 |
Correct |
508 ms |
215868 KB |
Output is correct |
192 |
Correct |
556 ms |
224924 KB |
Output is correct |
193 |
Correct |
560 ms |
261532 KB |
Output is correct |
194 |
Correct |
684 ms |
399944 KB |
Output is correct |
195 |
Correct |
746 ms |
399944 KB |
Output is correct |
196 |
Correct |
726 ms |
399936 KB |
Output is correct |
197 |
Correct |
715 ms |
399196 KB |
Output is correct |
198 |
Correct |
728 ms |
400064 KB |
Output is correct |
199 |
Correct |
751 ms |
399684 KB |
Output is correct |
200 |
Correct |
744 ms |
399976 KB |
Output is correct |
201 |
Correct |
753 ms |
399624 KB |
Output is correct |
202 |
Correct |
677 ms |
281672 KB |
Output is correct |
203 |
Correct |
595 ms |
281928 KB |
Output is correct |
204 |
Correct |
661 ms |
281160 KB |
Output is correct |
205 |
Correct |
618 ms |
281260 KB |
Output is correct |
206 |
Correct |
267 ms |
128412 KB |
Output is correct |
207 |
Correct |
636 ms |
353980 KB |
Output is correct |
208 |
Correct |
336 ms |
167332 KB |
Output is correct |
209 |
Correct |
640 ms |
360176 KB |
Output is correct |
210 |
Correct |
545 ms |
303148 KB |
Output is correct |
211 |
Correct |
240 ms |
119088 KB |
Output is correct |
212 |
Correct |
140 ms |
88016 KB |
Output is correct |
213 |
Correct |
321 ms |
170452 KB |
Output is correct |
214 |
Correct |
289 ms |
162704 KB |
Output is correct |
215 |
Correct |
312 ms |
173864 KB |
Output is correct |
216 |
Correct |
312 ms |
160080 KB |
Output is correct |
217 |
Correct |
287 ms |
162856 KB |
Output is correct |
218 |
Correct |
708 ms |
332324 KB |
Output is correct |
219 |
Correct |
311 ms |
157260 KB |
Output is correct |
220 |
Correct |
665 ms |
296188 KB |
Output is correct |
221 |
Correct |
397 ms |
154856 KB |
Output is correct |
222 |
Correct |
139 ms |
87036 KB |
Output is correct |