답안 #1075668

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1075668 2024-08-26T08:29:06 Z oscar1f Toy (CEOI24_toy) C++17
100 / 100
238 ms 304512 KB
#include<bits/stdc++.h>
using namespace std;

#define int long long

const int TAILLE_MAX=1500+5;
int nbCol,nbLig,tailleHori,tailleVerti,colDebHori,ligDebHori,colDebVerti,ligDebVerti,objLig,objCol;
char grille[TAILLE_MAX][TAILLE_MAX];
int gauche[TAILLE_MAX][TAILLE_MAX],droite[TAILLE_MAX][TAILLE_MAX],haut[TAILLE_MAX][TAILLE_MAX],bas[TAILLE_MAX][TAILLE_MAX];
int dv[TAILLE_MAX][TAILLE_MAX];

void DFS(int lig,int col) {
    if (dv[lig][col]==0) {
        //cout<<lig<<" "<<col<<endl;
        dv[lig][col]=1;

        if (col<nbCol and min(bas[lig][col],bas[lig][col+1])-max(haut[lig][col],haut[lig][col+1])>tailleVerti) {
            //cout<<"droite "<<lig<<" "<<col<<endl;
            DFS(lig,col+1); //droite
        }
        if (col>1 and min(bas[lig][col],bas[lig][col-1])-max(haut[lig][col],haut[lig][col-1])>tailleVerti) {
            //cout<<"gauche "<<lig<<" "<<col<<endl;
            DFS(lig,col-1); //gauche
        }
        if (lig<nbLig and min(droite[lig][col],droite[lig+1][col])-max(gauche[lig][col],gauche[lig+1][col])>tailleHori) {
            //cout<<"bas "<<lig<<" "<<col<<endl;
            DFS(lig+1,col); //bas
        }
        if (lig<nbLig and min(droite[lig][col],droite[lig-1][col])-max(gauche[lig][col],gauche[lig-1][col])>tailleHori) {
            //cout<<"haut "<<lig<<" "<<col<<endl;
            DFS(lig-1,col); //haut
        }
    }
}

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cin>>nbCol>>nbLig>>tailleHori>>tailleVerti;
    cin>>colDebHori>>ligDebHori>>colDebVerti>>ligDebVerti;
    for (int i=1;i<=nbLig;i++) {
        for (int j=1;j<=nbCol;j++) {
            cin>>grille[i][j];
            if (grille[i][j]=='*') {
                objLig=i;
                objCol=j;
                grille[i][j]='.';
            }
        }
    }

    for (int i=1;i<=nbLig;i++) {
        for (int j=1;j<=nbCol;j++) {
            if (grille[i][j]=='.') {
                gauche[i][j]=gauche[i][j-1];
                haut[i][j]=haut[i-1][j];
            }
            else {
                gauche[i][j]=j;
                haut[i][j]=i;
            }
        }
    }
    for (int i=1;i<=nbLig;i++) {
        droite[i][nbCol+1]=nbCol+1;
    }
    for (int j=1;j<=nbCol;j++) {
        bas[nbLig+1][j]=nbLig+1;
    }
    for (int i=nbLig;i>=1;i--) {
        for (int j=nbCol;j>=1;j--) {
            if (grille[i][j]=='.') {
                droite[i][j]=droite[i][j+1];
                bas[i][j]=bas[i+1][j];
            }   
            else {
                droite[i][j]=j;
                bas[i][j]=i;
            }
        }
    }
    
    /*for (int i=1;i<=nbLig;i++) {
        for (int j=1;j<=nbCol;j++) {
            cout<<bas[i][j]<<" ";
        }
        cout<<endl;
    }*/

    DFS(ligDebHori+1,colDebVerti+1);
    if (dv[objLig][objCol]==1) {
        cout<<"YES"<<endl;
    }
    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 860 KB Output is correct
4 Correct 1 ms 1624 KB Output is correct
5 Correct 1 ms 1628 KB Output is correct
6 Correct 1 ms 1368 KB Output is correct
7 Correct 1 ms 1372 KB Output is correct
8 Correct 1 ms 1236 KB Output is correct
9 Correct 0 ms 1116 KB Output is correct
10 Correct 1 ms 1368 KB Output is correct
11 Correct 1 ms 1372 KB Output is correct
12 Correct 0 ms 604 KB Output is correct
13 Correct 1 ms 1372 KB Output is correct
14 Correct 1 ms 1368 KB Output is correct
15 Correct 1 ms 1624 KB Output is correct
16 Correct 1 ms 1628 KB Output is correct
17 Correct 1 ms 1628 KB Output is correct
18 Correct 1 ms 1880 KB Output is correct
19 Correct 1 ms 1884 KB Output is correct
20 Correct 1 ms 1884 KB Output is correct
21 Correct 1 ms 1884 KB Output is correct
22 Correct 1 ms 2132 KB Output is correct
23 Correct 1 ms 1884 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 1628 KB Output is correct
31 Correct 1 ms 1628 KB Output is correct
32 Correct 1 ms 1628 KB Output is correct
33 Correct 1 ms 1712 KB Output is correct
34 Correct 1 ms 1628 KB Output is correct
35 Correct 1 ms 1628 KB Output is correct
36 Correct 1 ms 1184 KB Output is correct
37 Correct 1 ms 1372 KB Output is correct
38 Correct 1 ms 1372 KB Output is correct
39 Correct 1 ms 1488 KB Output is correct
40 Correct 1 ms 1372 KB Output is correct
41 Correct 1 ms 1480 KB Output is correct
42 Correct 1 ms 1628 KB Output is correct
43 Correct 1 ms 1628 KB Output is correct
44 Correct 1 ms 1628 KB Output is correct
45 Correct 1 ms 1748 KB Output is correct
46 Correct 0 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 860 KB Output is correct
4 Correct 1 ms 1624 KB Output is correct
5 Correct 1 ms 1628 KB Output is correct
6 Correct 1 ms 1368 KB Output is correct
7 Correct 1 ms 1372 KB Output is correct
8 Correct 1 ms 1236 KB Output is correct
9 Correct 0 ms 1116 KB Output is correct
10 Correct 1 ms 1368 KB Output is correct
11 Correct 1 ms 1372 KB Output is correct
12 Correct 0 ms 604 KB Output is correct
13 Correct 1 ms 1372 KB Output is correct
14 Correct 1 ms 1368 KB Output is correct
15 Correct 1 ms 1624 KB Output is correct
16 Correct 1 ms 1628 KB Output is correct
17 Correct 1 ms 1628 KB Output is correct
18 Correct 1 ms 1880 KB Output is correct
19 Correct 1 ms 1884 KB Output is correct
20 Correct 1 ms 1884 KB Output is correct
21 Correct 1 ms 1884 KB Output is correct
22 Correct 1 ms 2132 KB Output is correct
23 Correct 1 ms 1884 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 1628 KB Output is correct
31 Correct 1 ms 1628 KB Output is correct
32 Correct 1 ms 1628 KB Output is correct
33 Correct 1 ms 1712 KB Output is correct
34 Correct 1 ms 1628 KB Output is correct
35 Correct 1 ms 1628 KB Output is correct
36 Correct 1 ms 1184 KB Output is correct
37 Correct 1 ms 1372 KB Output is correct
38 Correct 1 ms 1372 KB Output is correct
39 Correct 1 ms 1488 KB Output is correct
40 Correct 1 ms 1372 KB Output is correct
41 Correct 1 ms 1480 KB Output is correct
42 Correct 1 ms 1628 KB Output is correct
43 Correct 1 ms 1628 KB Output is correct
44 Correct 1 ms 1628 KB Output is correct
45 Correct 1 ms 1748 KB Output is correct
46 Correct 0 ms 1116 KB Output is correct
47 Correct 1 ms 1116 KB Output is correct
48 Correct 1 ms 2140 KB Output is correct
49 Correct 1 ms 2396 KB Output is correct
50 Correct 1 ms 2140 KB Output is correct
51 Correct 1 ms 2396 KB Output is correct
52 Correct 1 ms 2140 KB Output is correct
53 Correct 1 ms 1368 KB Output is correct
54 Correct 1 ms 2140 KB Output is correct
55 Correct 1 ms 2140 KB Output is correct
56 Correct 1 ms 2140 KB Output is correct
57 Correct 1 ms 2140 KB Output is correct
58 Correct 1 ms 2136 KB Output is correct
59 Correct 1 ms 2796 KB Output is correct
60 Correct 2 ms 2908 KB Output is correct
61 Correct 1 ms 2772 KB Output is correct
62 Correct 2 ms 3420 KB Output is correct
63 Correct 2 ms 3420 KB Output is correct
64 Correct 2 ms 3404 KB Output is correct
65 Correct 2 ms 3420 KB Output is correct
66 Correct 2 ms 3384 KB Output is correct
67 Correct 2 ms 3420 KB Output is correct
68 Correct 2 ms 3164 KB Output is correct
69 Correct 2 ms 3164 KB Output is correct
70 Correct 2 ms 3164 KB Output is correct
71 Correct 2 ms 3164 KB Output is correct
72 Correct 2 ms 3252 KB Output is correct
73 Correct 2 ms 3164 KB Output is correct
74 Correct 2 ms 3164 KB Output is correct
75 Correct 1 ms 3108 KB Output is correct
76 Correct 2 ms 3420 KB Output is correct
77 Correct 2 ms 3164 KB Output is correct
78 Correct 2 ms 3420 KB Output is correct
79 Correct 2 ms 3164 KB Output is correct
80 Correct 1 ms 2136 KB Output is correct
81 Correct 2 ms 2396 KB Output is correct
82 Correct 1 ms 2652 KB Output is correct
83 Correct 2 ms 2392 KB Output is correct
84 Correct 2 ms 2652 KB Output is correct
85 Correct 1 ms 2652 KB Output is correct
86 Correct 2 ms 3164 KB Output is correct
87 Correct 2 ms 3248 KB Output is correct
88 Correct 2 ms 3164 KB Output is correct
89 Correct 2 ms 3164 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 1372 KB Output is correct
4 Correct 11 ms 16220 KB Output is correct
5 Correct 11 ms 13760 KB Output is correct
6 Correct 2 ms 2904 KB Output is correct
7 Correct 10 ms 12168 KB Output is correct
8 Correct 9 ms 13400 KB Output is correct
9 Correct 2 ms 3420 KB Output is correct
10 Correct 4 ms 8540 KB Output is correct
11 Correct 5 ms 8540 KB Output is correct
12 Correct 3 ms 5724 KB Output is correct
13 Correct 5 ms 8556 KB Output is correct
14 Correct 4 ms 8536 KB Output is correct
15 Correct 10 ms 17716 KB Output is correct
16 Correct 9 ms 15964 KB Output is correct
17 Correct 10 ms 16472 KB Output is correct
18 Correct 12 ms 18780 KB Output is correct
19 Correct 12 ms 18780 KB Output is correct
20 Correct 15 ms 18780 KB Output is correct
21 Correct 11 ms 18780 KB Output is correct
22 Correct 14 ms 18780 KB Output is correct
23 Correct 11 ms 18828 KB Output is correct
24 Correct 11 ms 16808 KB Output is correct
25 Correct 10 ms 16732 KB Output is correct
26 Correct 11 ms 16596 KB Output is correct
27 Correct 12 ms 16728 KB Output is correct
28 Correct 15 ms 16772 KB Output is correct
29 Correct 11 ms 16540 KB Output is correct
30 Correct 12 ms 18108 KB Output is correct
31 Correct 11 ms 17924 KB Output is correct
32 Correct 10 ms 18520 KB Output is correct
33 Correct 10 ms 17244 KB Output is correct
34 Correct 12 ms 17496 KB Output is correct
35 Correct 12 ms 17244 KB Output is correct
36 Correct 4 ms 8028 KB Output is correct
37 Correct 6 ms 11876 KB Output is correct
38 Correct 7 ms 11612 KB Output is correct
39 Correct 7 ms 11660 KB Output is correct
40 Correct 6 ms 12120 KB Output is correct
41 Correct 7 ms 11880 KB Output is correct
42 Correct 10 ms 16468 KB Output is correct
43 Correct 11 ms 16476 KB Output is correct
44 Correct 13 ms 16732 KB Output is correct
45 Correct 11 ms 16988 KB Output is correct
46 Correct 4 ms 8096 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 860 KB Output is correct
4 Correct 1 ms 1624 KB Output is correct
5 Correct 1 ms 1628 KB Output is correct
6 Correct 1 ms 1368 KB Output is correct
7 Correct 1 ms 1372 KB Output is correct
8 Correct 1 ms 1236 KB Output is correct
9 Correct 0 ms 1116 KB Output is correct
10 Correct 1 ms 1368 KB Output is correct
11 Correct 1 ms 1372 KB Output is correct
12 Correct 0 ms 604 KB Output is correct
13 Correct 1 ms 1372 KB Output is correct
14 Correct 1 ms 1368 KB Output is correct
15 Correct 1 ms 1624 KB Output is correct
16 Correct 1 ms 1628 KB Output is correct
17 Correct 1 ms 1628 KB Output is correct
18 Correct 1 ms 1880 KB Output is correct
19 Correct 1 ms 1884 KB Output is correct
20 Correct 1 ms 1884 KB Output is correct
21 Correct 1 ms 1884 KB Output is correct
22 Correct 1 ms 2132 KB Output is correct
23 Correct 1 ms 1884 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 1628 KB Output is correct
31 Correct 1 ms 1628 KB Output is correct
32 Correct 1 ms 1628 KB Output is correct
33 Correct 1 ms 1712 KB Output is correct
34 Correct 1 ms 1628 KB Output is correct
35 Correct 1 ms 1628 KB Output is correct
36 Correct 1 ms 1184 KB Output is correct
37 Correct 1 ms 1372 KB Output is correct
38 Correct 1 ms 1372 KB Output is correct
39 Correct 1 ms 1488 KB Output is correct
40 Correct 1 ms 1372 KB Output is correct
41 Correct 1 ms 1480 KB Output is correct
42 Correct 1 ms 1628 KB Output is correct
43 Correct 1 ms 1628 KB Output is correct
44 Correct 1 ms 1628 KB Output is correct
45 Correct 1 ms 1748 KB Output is correct
46 Correct 0 ms 1116 KB Output is correct
47 Correct 1 ms 1116 KB Output is correct
48 Correct 1 ms 2140 KB Output is correct
49 Correct 1 ms 2396 KB Output is correct
50 Correct 1 ms 2140 KB Output is correct
51 Correct 1 ms 2396 KB Output is correct
52 Correct 1 ms 2140 KB Output is correct
53 Correct 1 ms 1368 KB Output is correct
54 Correct 1 ms 2140 KB Output is correct
55 Correct 1 ms 2140 KB Output is correct
56 Correct 1 ms 2140 KB Output is correct
57 Correct 1 ms 2140 KB Output is correct
58 Correct 1 ms 2136 KB Output is correct
59 Correct 1 ms 2796 KB Output is correct
60 Correct 2 ms 2908 KB Output is correct
61 Correct 1 ms 2772 KB Output is correct
62 Correct 2 ms 3420 KB Output is correct
63 Correct 2 ms 3420 KB Output is correct
64 Correct 2 ms 3404 KB Output is correct
65 Correct 2 ms 3420 KB Output is correct
66 Correct 2 ms 3384 KB Output is correct
67 Correct 2 ms 3420 KB Output is correct
68 Correct 2 ms 3164 KB Output is correct
69 Correct 2 ms 3164 KB Output is correct
70 Correct 2 ms 3164 KB Output is correct
71 Correct 2 ms 3164 KB Output is correct
72 Correct 2 ms 3252 KB Output is correct
73 Correct 2 ms 3164 KB Output is correct
74 Correct 2 ms 3164 KB Output is correct
75 Correct 1 ms 3108 KB Output is correct
76 Correct 2 ms 3420 KB Output is correct
77 Correct 2 ms 3164 KB Output is correct
78 Correct 2 ms 3420 KB Output is correct
79 Correct 2 ms 3164 KB Output is correct
80 Correct 1 ms 2136 KB Output is correct
81 Correct 2 ms 2396 KB Output is correct
82 Correct 1 ms 2652 KB Output is correct
83 Correct 2 ms 2392 KB Output is correct
84 Correct 2 ms 2652 KB Output is correct
85 Correct 1 ms 2652 KB Output is correct
86 Correct 2 ms 3164 KB Output is correct
87 Correct 2 ms 3248 KB Output is correct
88 Correct 2 ms 3164 KB Output is correct
89 Correct 2 ms 3164 KB Output is correct
90 Correct 1 ms 2140 KB Output is correct
91 Correct 1 ms 1372 KB Output is correct
92 Correct 11 ms 16220 KB Output is correct
93 Correct 11 ms 13760 KB Output is correct
94 Correct 2 ms 2904 KB Output is correct
95 Correct 10 ms 12168 KB Output is correct
96 Correct 9 ms 13400 KB Output is correct
97 Correct 2 ms 3420 KB Output is correct
98 Correct 4 ms 8540 KB Output is correct
99 Correct 5 ms 8540 KB Output is correct
100 Correct 3 ms 5724 KB Output is correct
101 Correct 5 ms 8556 KB Output is correct
102 Correct 4 ms 8536 KB Output is correct
103 Correct 10 ms 17716 KB Output is correct
104 Correct 9 ms 15964 KB Output is correct
105 Correct 10 ms 16472 KB Output is correct
106 Correct 12 ms 18780 KB Output is correct
107 Correct 12 ms 18780 KB Output is correct
108 Correct 15 ms 18780 KB Output is correct
109 Correct 11 ms 18780 KB Output is correct
110 Correct 14 ms 18780 KB Output is correct
111 Correct 11 ms 18828 KB Output is correct
112 Correct 11 ms 16808 KB Output is correct
113 Correct 10 ms 16732 KB Output is correct
114 Correct 11 ms 16596 KB Output is correct
115 Correct 12 ms 16728 KB Output is correct
116 Correct 15 ms 16772 KB Output is correct
117 Correct 11 ms 16540 KB Output is correct
118 Correct 12 ms 18108 KB Output is correct
119 Correct 11 ms 17924 KB Output is correct
120 Correct 10 ms 18520 KB Output is correct
121 Correct 10 ms 17244 KB Output is correct
122 Correct 12 ms 17496 KB Output is correct
123 Correct 12 ms 17244 KB Output is correct
124 Correct 4 ms 8028 KB Output is correct
125 Correct 6 ms 11876 KB Output is correct
126 Correct 7 ms 11612 KB Output is correct
127 Correct 7 ms 11660 KB Output is correct
128 Correct 6 ms 12120 KB Output is correct
129 Correct 7 ms 11880 KB Output is correct
130 Correct 10 ms 16468 KB Output is correct
131 Correct 11 ms 16476 KB Output is correct
132 Correct 13 ms 16732 KB Output is correct
133 Correct 11 ms 16988 KB Output is correct
134 Correct 4 ms 8096 KB Output is correct
135 Correct 2 ms 5724 KB Output is correct
136 Correct 5 ms 10844 KB Output is correct
137 Correct 5 ms 10844 KB Output is correct
138 Correct 2 ms 4972 KB Output is correct
139 Correct 5 ms 10844 KB Output is correct
140 Correct 6 ms 10840 KB Output is correct
141 Correct 3 ms 8028 KB Output is correct
142 Correct 5 ms 10844 KB Output is correct
143 Correct 5 ms 10840 KB Output is correct
144 Correct 1 ms 1116 KB Output is correct
145 Correct 6 ms 10992 KB Output is correct
146 Correct 6 ms 10844 KB Output is correct
147 Correct 12 ms 18268 KB Output is correct
148 Correct 13 ms 19292 KB Output is correct
149 Correct 13 ms 19036 KB Output is correct
150 Correct 16 ms 25432 KB Output is correct
151 Correct 17 ms 25436 KB Output is correct
152 Correct 16 ms 25436 KB Output is correct
153 Correct 16 ms 25436 KB Output is correct
154 Correct 18 ms 25436 KB Output is correct
155 Correct 18 ms 25432 KB Output is correct
156 Correct 15 ms 22364 KB Output is correct
157 Correct 15 ms 22576 KB Output is correct
158 Correct 15 ms 22236 KB Output is correct
159 Correct 16 ms 22364 KB Output is correct
160 Correct 16 ms 22364 KB Output is correct
161 Correct 15 ms 22364 KB Output is correct
162 Correct 14 ms 23712 KB Output is correct
163 Correct 14 ms 23300 KB Output is correct
164 Correct 14 ms 24668 KB Output is correct
165 Correct 14 ms 22660 KB Output is correct
166 Correct 15 ms 24156 KB Output is correct
167 Correct 15 ms 23176 KB Output is correct
168 Correct 5 ms 10332 KB Output is correct
169 Correct 8 ms 15196 KB Output is correct
170 Correct 9 ms 15436 KB Output is correct
171 Correct 9 ms 15008 KB Output is correct
172 Correct 7 ms 14424 KB Output is correct
173 Correct 10 ms 15380 KB Output is correct
174 Correct 16 ms 23132 KB Output is correct
175 Correct 16 ms 25108 KB Output is correct
176 Correct 15 ms 24920 KB Output is correct
177 Correct 14 ms 20316 KB Output is correct
178 Correct 5 ms 10332 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 860 KB Output is correct
4 Correct 1 ms 1624 KB Output is correct
5 Correct 1 ms 1628 KB Output is correct
6 Correct 1 ms 1368 KB Output is correct
7 Correct 1 ms 1372 KB Output is correct
8 Correct 1 ms 1236 KB Output is correct
9 Correct 0 ms 1116 KB Output is correct
10 Correct 1 ms 1368 KB Output is correct
11 Correct 1 ms 1372 KB Output is correct
12 Correct 0 ms 604 KB Output is correct
13 Correct 1 ms 1372 KB Output is correct
14 Correct 1 ms 1368 KB Output is correct
15 Correct 1 ms 1624 KB Output is correct
16 Correct 1 ms 1628 KB Output is correct
17 Correct 1 ms 1628 KB Output is correct
18 Correct 1 ms 1880 KB Output is correct
19 Correct 1 ms 1884 KB Output is correct
20 Correct 1 ms 1884 KB Output is correct
21 Correct 1 ms 1884 KB Output is correct
22 Correct 1 ms 2132 KB Output is correct
23 Correct 1 ms 1884 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 1628 KB Output is correct
31 Correct 1 ms 1628 KB Output is correct
32 Correct 1 ms 1628 KB Output is correct
33 Correct 1 ms 1712 KB Output is correct
34 Correct 1 ms 1628 KB Output is correct
35 Correct 1 ms 1628 KB Output is correct
36 Correct 1 ms 1184 KB Output is correct
37 Correct 1 ms 1372 KB Output is correct
38 Correct 1 ms 1372 KB Output is correct
39 Correct 1 ms 1488 KB Output is correct
40 Correct 1 ms 1372 KB Output is correct
41 Correct 1 ms 1480 KB Output is correct
42 Correct 1 ms 1628 KB Output is correct
43 Correct 1 ms 1628 KB Output is correct
44 Correct 1 ms 1628 KB Output is correct
45 Correct 1 ms 1748 KB Output is correct
46 Correct 0 ms 1116 KB Output is correct
47 Correct 1 ms 1116 KB Output is correct
48 Correct 1 ms 2140 KB Output is correct
49 Correct 1 ms 2396 KB Output is correct
50 Correct 1 ms 2140 KB Output is correct
51 Correct 1 ms 2396 KB Output is correct
52 Correct 1 ms 2140 KB Output is correct
53 Correct 1 ms 1368 KB Output is correct
54 Correct 1 ms 2140 KB Output is correct
55 Correct 1 ms 2140 KB Output is correct
56 Correct 1 ms 2140 KB Output is correct
57 Correct 1 ms 2140 KB Output is correct
58 Correct 1 ms 2136 KB Output is correct
59 Correct 1 ms 2796 KB Output is correct
60 Correct 2 ms 2908 KB Output is correct
61 Correct 1 ms 2772 KB Output is correct
62 Correct 2 ms 3420 KB Output is correct
63 Correct 2 ms 3420 KB Output is correct
64 Correct 2 ms 3404 KB Output is correct
65 Correct 2 ms 3420 KB Output is correct
66 Correct 2 ms 3384 KB Output is correct
67 Correct 2 ms 3420 KB Output is correct
68 Correct 2 ms 3164 KB Output is correct
69 Correct 2 ms 3164 KB Output is correct
70 Correct 2 ms 3164 KB Output is correct
71 Correct 2 ms 3164 KB Output is correct
72 Correct 2 ms 3252 KB Output is correct
73 Correct 2 ms 3164 KB Output is correct
74 Correct 2 ms 3164 KB Output is correct
75 Correct 1 ms 3108 KB Output is correct
76 Correct 2 ms 3420 KB Output is correct
77 Correct 2 ms 3164 KB Output is correct
78 Correct 2 ms 3420 KB Output is correct
79 Correct 2 ms 3164 KB Output is correct
80 Correct 1 ms 2136 KB Output is correct
81 Correct 2 ms 2396 KB Output is correct
82 Correct 1 ms 2652 KB Output is correct
83 Correct 2 ms 2392 KB Output is correct
84 Correct 2 ms 2652 KB Output is correct
85 Correct 1 ms 2652 KB Output is correct
86 Correct 2 ms 3164 KB Output is correct
87 Correct 2 ms 3248 KB Output is correct
88 Correct 2 ms 3164 KB Output is correct
89 Correct 2 ms 3164 KB Output is correct
90 Correct 1 ms 2140 KB Output is correct
91 Correct 1 ms 1372 KB Output is correct
92 Correct 11 ms 16220 KB Output is correct
93 Correct 11 ms 13760 KB Output is correct
94 Correct 2 ms 2904 KB Output is correct
95 Correct 10 ms 12168 KB Output is correct
96 Correct 9 ms 13400 KB Output is correct
97 Correct 2 ms 3420 KB Output is correct
98 Correct 4 ms 8540 KB Output is correct
99 Correct 5 ms 8540 KB Output is correct
100 Correct 3 ms 5724 KB Output is correct
101 Correct 5 ms 8556 KB Output is correct
102 Correct 4 ms 8536 KB Output is correct
103 Correct 10 ms 17716 KB Output is correct
104 Correct 9 ms 15964 KB Output is correct
105 Correct 10 ms 16472 KB Output is correct
106 Correct 12 ms 18780 KB Output is correct
107 Correct 12 ms 18780 KB Output is correct
108 Correct 15 ms 18780 KB Output is correct
109 Correct 11 ms 18780 KB Output is correct
110 Correct 14 ms 18780 KB Output is correct
111 Correct 11 ms 18828 KB Output is correct
112 Correct 11 ms 16808 KB Output is correct
113 Correct 10 ms 16732 KB Output is correct
114 Correct 11 ms 16596 KB Output is correct
115 Correct 12 ms 16728 KB Output is correct
116 Correct 15 ms 16772 KB Output is correct
117 Correct 11 ms 16540 KB Output is correct
118 Correct 12 ms 18108 KB Output is correct
119 Correct 11 ms 17924 KB Output is correct
120 Correct 10 ms 18520 KB Output is correct
121 Correct 10 ms 17244 KB Output is correct
122 Correct 12 ms 17496 KB Output is correct
123 Correct 12 ms 17244 KB Output is correct
124 Correct 4 ms 8028 KB Output is correct
125 Correct 6 ms 11876 KB Output is correct
126 Correct 7 ms 11612 KB Output is correct
127 Correct 7 ms 11660 KB Output is correct
128 Correct 6 ms 12120 KB Output is correct
129 Correct 7 ms 11880 KB Output is correct
130 Correct 10 ms 16468 KB Output is correct
131 Correct 11 ms 16476 KB Output is correct
132 Correct 13 ms 16732 KB Output is correct
133 Correct 11 ms 16988 KB Output is correct
134 Correct 4 ms 8096 KB Output is correct
135 Correct 2 ms 5724 KB Output is correct
136 Correct 5 ms 10844 KB Output is correct
137 Correct 5 ms 10844 KB Output is correct
138 Correct 2 ms 4972 KB Output is correct
139 Correct 5 ms 10844 KB Output is correct
140 Correct 6 ms 10840 KB Output is correct
141 Correct 3 ms 8028 KB Output is correct
142 Correct 5 ms 10844 KB Output is correct
143 Correct 5 ms 10840 KB Output is correct
144 Correct 1 ms 1116 KB Output is correct
145 Correct 6 ms 10992 KB Output is correct
146 Correct 6 ms 10844 KB Output is correct
147 Correct 12 ms 18268 KB Output is correct
148 Correct 13 ms 19292 KB Output is correct
149 Correct 13 ms 19036 KB Output is correct
150 Correct 16 ms 25432 KB Output is correct
151 Correct 17 ms 25436 KB Output is correct
152 Correct 16 ms 25436 KB Output is correct
153 Correct 16 ms 25436 KB Output is correct
154 Correct 18 ms 25436 KB Output is correct
155 Correct 18 ms 25432 KB Output is correct
156 Correct 15 ms 22364 KB Output is correct
157 Correct 15 ms 22576 KB Output is correct
158 Correct 15 ms 22236 KB Output is correct
159 Correct 16 ms 22364 KB Output is correct
160 Correct 16 ms 22364 KB Output is correct
161 Correct 15 ms 22364 KB Output is correct
162 Correct 14 ms 23712 KB Output is correct
163 Correct 14 ms 23300 KB Output is correct
164 Correct 14 ms 24668 KB Output is correct
165 Correct 14 ms 22660 KB Output is correct
166 Correct 15 ms 24156 KB Output is correct
167 Correct 15 ms 23176 KB Output is correct
168 Correct 5 ms 10332 KB Output is correct
169 Correct 8 ms 15196 KB Output is correct
170 Correct 9 ms 15436 KB Output is correct
171 Correct 9 ms 15008 KB Output is correct
172 Correct 7 ms 14424 KB Output is correct
173 Correct 10 ms 15380 KB Output is correct
174 Correct 16 ms 23132 KB Output is correct
175 Correct 16 ms 25108 KB Output is correct
176 Correct 15 ms 24920 KB Output is correct
177 Correct 14 ms 20316 KB Output is correct
178 Correct 5 ms 10332 KB Output is correct
179 Correct 19 ms 34396 KB Output is correct
180 Correct 52 ms 75348 KB Output is correct
181 Correct 52 ms 75344 KB Output is correct
182 Correct 20 ms 36604 KB Output is correct
183 Correct 47 ms 75424 KB Output is correct
184 Correct 47 ms 75344 KB Output is correct
185 Correct 40 ms 66128 KB Output is correct
186 Correct 49 ms 75568 KB Output is correct
187 Correct 49 ms 75344 KB Output is correct
188 Correct 37 ms 58204 KB Output is correct
189 Correct 57 ms 75496 KB Output is correct
190 Correct 58 ms 75476 KB Output is correct
191 Correct 164 ms 177996 KB Output is correct
192 Correct 198 ms 236884 KB Output is correct
193 Correct 202 ms 218388 KB Output is correct
194 Correct 232 ms 304512 KB Output is correct
195 Correct 227 ms 304468 KB Output is correct
196 Correct 229 ms 304464 KB Output is correct
197 Correct 225 ms 304464 KB Output is correct
198 Correct 238 ms 304456 KB Output is correct
199 Correct 219 ms 304464 KB Output is correct
200 Correct 203 ms 251740 KB Output is correct
201 Correct 229 ms 251576 KB Output is correct
202 Correct 206 ms 251200 KB Output is correct
203 Correct 201 ms 251016 KB Output is correct
204 Correct 218 ms 251204 KB Output is correct
205 Correct 209 ms 251028 KB Output is correct
206 Correct 225 ms 274000 KB Output is correct
207 Correct 207 ms 271952 KB Output is correct
208 Correct 184 ms 262696 KB Output is correct
209 Correct 208 ms 278772 KB Output is correct
210 Correct 220 ms 275536 KB Output is correct
211 Correct 231 ms 289104 KB Output is correct
212 Correct 43 ms 68368 KB Output is correct
213 Correct 100 ms 140884 KB Output is correct
214 Correct 93 ms 136736 KB Output is correct
215 Correct 98 ms 143696 KB Output is correct
216 Correct 92 ms 135272 KB Output is correct
217 Correct 94 ms 138324 KB Output is correct
218 Correct 208 ms 282192 KB Output is correct
219 Correct 212 ms 215512 KB Output is correct
220 Correct 226 ms 281048 KB Output is correct
221 Correct 230 ms 270164 KB Output is correct
222 Correct 46 ms 69968 KB Output is correct