Submission #896378

# Submission time Handle Problem Language Result Execution time Memory
896378 2024-01-01T10:48:35 Z abcvuitunggio Fountain Parks (IOI21_parks) C++17
100 / 100
396 ms 54272 KB
#include "parks.h"
#include <bits/stdc++.h>
using namespace std;
int n,order[200001],p[200001],cnt;
map <int, int> mp[300001];
vector <int> px,py;
int f(int i){
    return (p[i]==i?i:p[i]=f(p[i]));
}
bool unite(int i, int j){
    i=f(i);
    j=f(j);
    if (i==j)
        return false;
    p[j]=i;
    return true;
}
int construct_roads(vector <int> x, vector <int> y){
    vector <int32_t> u,v,a,b;
    n=x.size();
    for (int i=0;i<n;i++)
        mp[x[i]][y[i]]=i;
    iota(p,p+n,0);
    iota(order,order+n,0);
    px=x,py=y;
    sort(order,order+n,[](int i, int j){return px[i]+py[i]<px[j]+py[j];});
    for (int it=0;it<n;it++){
        int i=order[it];
        if (mp[x[i]].count(y[i]-2)){
            int j=mp[x[i]][y[i]-2],X=x[i]+(x[i]+y[i])%4-1,Y=y[i]-1;
            if (!mp[X].count(Y)){
                u.push_back(i);
                v.push_back(j);
                cnt+=unite(i,j);
                a.push_back(X);
                b.push_back(Y);
                mp[X][Y]=1;
            }
        }
        if (mp[x[i]-2].count(y[i])){
            int j=mp[x[i]-2][y[i]],X=x[i]-1,Y=y[i]+1-(x[i]+y[i])%4;
            if (!mp[X].count(Y)){
                u.push_back(i);
                v.push_back(j);
                cnt+=unite(i,j);
                a.push_back(X);
                b.push_back(Y);
                mp[X][Y]=1;
            }
        }
    }
    if (cnt<n-1)
        return 0;
    build(u,v,a,b);
    return 1;
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14936 KB Output is correct
2 Correct 3 ms 15092 KB Output is correct
3 Correct 3 ms 14940 KB Output is correct
4 Correct 3 ms 14940 KB Output is correct
5 Correct 3 ms 14940 KB Output is correct
6 Correct 3 ms 14940 KB Output is correct
7 Correct 3 ms 14940 KB Output is correct
8 Correct 3 ms 14940 KB Output is correct
9 Correct 121 ms 31716 KB Output is correct
10 Correct 10 ms 16728 KB Output is correct
11 Correct 49 ms 23844 KB Output is correct
12 Correct 14 ms 17752 KB Output is correct
13 Correct 30 ms 20936 KB Output is correct
14 Correct 4 ms 14936 KB Output is correct
15 Correct 4 ms 15080 KB Output is correct
16 Correct 122 ms 31616 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14936 KB Output is correct
2 Correct 3 ms 15092 KB Output is correct
3 Correct 3 ms 14940 KB Output is correct
4 Correct 3 ms 14940 KB Output is correct
5 Correct 3 ms 14940 KB Output is correct
6 Correct 3 ms 14940 KB Output is correct
7 Correct 3 ms 14940 KB Output is correct
8 Correct 3 ms 14940 KB Output is correct
9 Correct 121 ms 31716 KB Output is correct
10 Correct 10 ms 16728 KB Output is correct
11 Correct 49 ms 23844 KB Output is correct
12 Correct 14 ms 17752 KB Output is correct
13 Correct 30 ms 20936 KB Output is correct
14 Correct 4 ms 14936 KB Output is correct
15 Correct 4 ms 15080 KB Output is correct
16 Correct 122 ms 31616 KB Output is correct
17 Correct 5 ms 14940 KB Output is correct
18 Correct 3 ms 14940 KB Output is correct
19 Correct 3 ms 15192 KB Output is correct
20 Correct 3 ms 14940 KB Output is correct
21 Correct 3 ms 14940 KB Output is correct
22 Correct 3 ms 14940 KB Output is correct
23 Correct 283 ms 48804 KB Output is correct
24 Correct 3 ms 14940 KB Output is correct
25 Correct 4 ms 15196 KB Output is correct
26 Correct 6 ms 15196 KB Output is correct
27 Correct 7 ms 15452 KB Output is correct
28 Correct 98 ms 28448 KB Output is correct
29 Correct 155 ms 35136 KB Output is correct
30 Correct 224 ms 42028 KB Output is correct
31 Correct 277 ms 48808 KB Output is correct
32 Correct 4 ms 14940 KB Output is correct
33 Correct 3 ms 14940 KB Output is correct
34 Correct 3 ms 14940 KB Output is correct
35 Correct 3 ms 14944 KB Output is correct
36 Correct 3 ms 14940 KB Output is correct
37 Correct 3 ms 14952 KB Output is correct
38 Correct 3 ms 14940 KB Output is correct
39 Correct 3 ms 14956 KB Output is correct
40 Correct 3 ms 14940 KB Output is correct
41 Correct 3 ms 14940 KB Output is correct
42 Correct 3 ms 14936 KB Output is correct
43 Correct 4 ms 15256 KB Output is correct
44 Correct 5 ms 15252 KB Output is correct
45 Correct 123 ms 31712 KB Output is correct
46 Correct 193 ms 39308 KB Output is correct
47 Correct 187 ms 39496 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14936 KB Output is correct
2 Correct 3 ms 15092 KB Output is correct
3 Correct 3 ms 14940 KB Output is correct
4 Correct 3 ms 14940 KB Output is correct
5 Correct 3 ms 14940 KB Output is correct
6 Correct 3 ms 14940 KB Output is correct
7 Correct 3 ms 14940 KB Output is correct
8 Correct 3 ms 14940 KB Output is correct
9 Correct 121 ms 31716 KB Output is correct
10 Correct 10 ms 16728 KB Output is correct
11 Correct 49 ms 23844 KB Output is correct
12 Correct 14 ms 17752 KB Output is correct
13 Correct 30 ms 20936 KB Output is correct
14 Correct 4 ms 14936 KB Output is correct
15 Correct 4 ms 15080 KB Output is correct
16 Correct 122 ms 31616 KB Output is correct
17 Correct 5 ms 14940 KB Output is correct
18 Correct 3 ms 14940 KB Output is correct
19 Correct 3 ms 15192 KB Output is correct
20 Correct 3 ms 14940 KB Output is correct
21 Correct 3 ms 14940 KB Output is correct
22 Correct 3 ms 14940 KB Output is correct
23 Correct 283 ms 48804 KB Output is correct
24 Correct 3 ms 14940 KB Output is correct
25 Correct 4 ms 15196 KB Output is correct
26 Correct 6 ms 15196 KB Output is correct
27 Correct 7 ms 15452 KB Output is correct
28 Correct 98 ms 28448 KB Output is correct
29 Correct 155 ms 35136 KB Output is correct
30 Correct 224 ms 42028 KB Output is correct
31 Correct 277 ms 48808 KB Output is correct
32 Correct 4 ms 14940 KB Output is correct
33 Correct 3 ms 14940 KB Output is correct
34 Correct 3 ms 14940 KB Output is correct
35 Correct 3 ms 14944 KB Output is correct
36 Correct 3 ms 14940 KB Output is correct
37 Correct 3 ms 14952 KB Output is correct
38 Correct 3 ms 14940 KB Output is correct
39 Correct 3 ms 14956 KB Output is correct
40 Correct 3 ms 14940 KB Output is correct
41 Correct 3 ms 14940 KB Output is correct
42 Correct 3 ms 14936 KB Output is correct
43 Correct 4 ms 15256 KB Output is correct
44 Correct 5 ms 15252 KB Output is correct
45 Correct 123 ms 31712 KB Output is correct
46 Correct 193 ms 39308 KB Output is correct
47 Correct 187 ms 39496 KB Output is correct
48 Correct 3 ms 14936 KB Output is correct
49 Correct 3 ms 14940 KB Output is correct
50 Correct 3 ms 14940 KB Output is correct
51 Correct 3 ms 14940 KB Output is correct
52 Correct 3 ms 14940 KB Output is correct
53 Correct 3 ms 14940 KB Output is correct
54 Correct 3 ms 14940 KB Output is correct
55 Correct 307 ms 48884 KB Output is correct
56 Correct 3 ms 14940 KB Output is correct
57 Correct 5 ms 15196 KB Output is correct
58 Correct 10 ms 15944 KB Output is correct
59 Correct 11 ms 16220 KB Output is correct
60 Correct 124 ms 31672 KB Output is correct
61 Correct 176 ms 37540 KB Output is correct
62 Correct 235 ms 42968 KB Output is correct
63 Correct 290 ms 48924 KB Output is correct
64 Correct 3 ms 14940 KB Output is correct
65 Correct 3 ms 14960 KB Output is correct
66 Correct 3 ms 14940 KB Output is correct
67 Correct 282 ms 48888 KB Output is correct
68 Correct 290 ms 48952 KB Output is correct
69 Correct 274 ms 48804 KB Output is correct
70 Correct 5 ms 15704 KB Output is correct
71 Correct 8 ms 15964 KB Output is correct
72 Correct 119 ms 31736 KB Output is correct
73 Correct 189 ms 40356 KB Output is correct
74 Correct 288 ms 48992 KB Output is correct
75 Correct 302 ms 52728 KB Output is correct
76 Correct 268 ms 48808 KB Output is correct
77 Correct 7 ms 15708 KB Output is correct
78 Correct 10 ms 16372 KB Output is correct
79 Correct 136 ms 32576 KB Output is correct
80 Correct 253 ms 41936 KB Output is correct
81 Correct 287 ms 50912 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14936 KB Output is correct
2 Correct 3 ms 15092 KB Output is correct
3 Correct 3 ms 14940 KB Output is correct
4 Correct 3 ms 14940 KB Output is correct
5 Correct 3 ms 14940 KB Output is correct
6 Correct 3 ms 14940 KB Output is correct
7 Correct 3 ms 14940 KB Output is correct
8 Correct 3 ms 14940 KB Output is correct
9 Correct 121 ms 31716 KB Output is correct
10 Correct 10 ms 16728 KB Output is correct
11 Correct 49 ms 23844 KB Output is correct
12 Correct 14 ms 17752 KB Output is correct
13 Correct 30 ms 20936 KB Output is correct
14 Correct 4 ms 14936 KB Output is correct
15 Correct 4 ms 15080 KB Output is correct
16 Correct 122 ms 31616 KB Output is correct
17 Correct 3 ms 14940 KB Output is correct
18 Correct 3 ms 14940 KB Output is correct
19 Correct 3 ms 14960 KB Output is correct
20 Correct 228 ms 48808 KB Output is correct
21 Correct 190 ms 48948 KB Output is correct
22 Correct 292 ms 48888 KB Output is correct
23 Correct 219 ms 43820 KB Output is correct
24 Correct 148 ms 30184 KB Output is correct
25 Correct 278 ms 42536 KB Output is correct
26 Correct 280 ms 42508 KB Output is correct
27 Correct 327 ms 48908 KB Output is correct
28 Correct 297 ms 48880 KB Output is correct
29 Correct 363 ms 48984 KB Output is correct
30 Correct 348 ms 48984 KB Output is correct
31 Correct 3 ms 14936 KB Output is correct
32 Correct 19 ms 17500 KB Output is correct
33 Correct 51 ms 22364 KB Output is correct
34 Correct 213 ms 49000 KB Output is correct
35 Correct 11 ms 16216 KB Output is correct
36 Correct 49 ms 21828 KB Output is correct
37 Correct 96 ms 28624 KB Output is correct
38 Correct 100 ms 28408 KB Output is correct
39 Correct 147 ms 33396 KB Output is correct
40 Correct 197 ms 38564 KB Output is correct
41 Correct 276 ms 43804 KB Output is correct
42 Correct 316 ms 48808 KB Output is correct
43 Correct 3 ms 14936 KB Output is correct
44 Correct 3 ms 14940 KB Output is correct
45 Correct 3 ms 14936 KB Output is correct
46 Correct 3 ms 14940 KB Output is correct
47 Correct 3 ms 14936 KB Output is correct
48 Correct 3 ms 14940 KB Output is correct
49 Correct 3 ms 14940 KB Output is correct
50 Correct 3 ms 14940 KB Output is correct
51 Correct 3 ms 14940 KB Output is correct
52 Correct 3 ms 14940 KB Output is correct
53 Correct 3 ms 14940 KB Output is correct
54 Correct 4 ms 15196 KB Output is correct
55 Correct 5 ms 15208 KB Output is correct
56 Correct 119 ms 31800 KB Output is correct
57 Correct 176 ms 39332 KB Output is correct
58 Correct 189 ms 39556 KB Output is correct
59 Correct 3 ms 14940 KB Output is correct
60 Correct 3 ms 14940 KB Output is correct
61 Correct 3 ms 14940 KB Output is correct
62 Correct 271 ms 48880 KB Output is correct
63 Correct 263 ms 48868 KB Output is correct
64 Correct 280 ms 48680 KB Output is correct
65 Correct 6 ms 15452 KB Output is correct
66 Correct 8 ms 15964 KB Output is correct
67 Correct 135 ms 31664 KB Output is correct
68 Correct 198 ms 40364 KB Output is correct
69 Correct 274 ms 48804 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14936 KB Output is correct
2 Correct 3 ms 15092 KB Output is correct
3 Correct 3 ms 14940 KB Output is correct
4 Correct 3 ms 14940 KB Output is correct
5 Correct 3 ms 14940 KB Output is correct
6 Correct 3 ms 14940 KB Output is correct
7 Correct 3 ms 14940 KB Output is correct
8 Correct 3 ms 14940 KB Output is correct
9 Correct 121 ms 31716 KB Output is correct
10 Correct 10 ms 16728 KB Output is correct
11 Correct 49 ms 23844 KB Output is correct
12 Correct 14 ms 17752 KB Output is correct
13 Correct 30 ms 20936 KB Output is correct
14 Correct 4 ms 14936 KB Output is correct
15 Correct 4 ms 15080 KB Output is correct
16 Correct 122 ms 31616 KB Output is correct
17 Correct 254 ms 48804 KB Output is correct
18 Correct 267 ms 48824 KB Output is correct
19 Correct 201 ms 48964 KB Output is correct
20 Correct 348 ms 54272 KB Output is correct
21 Correct 292 ms 46504 KB Output is correct
22 Correct 3 ms 14936 KB Output is correct
23 Correct 35 ms 20464 KB Output is correct
24 Correct 18 ms 18012 KB Output is correct
25 Correct 61 ms 25272 KB Output is correct
26 Correct 125 ms 32828 KB Output is correct
27 Correct 157 ms 33572 KB Output is correct
28 Correct 205 ms 38228 KB Output is correct
29 Correct 245 ms 43208 KB Output is correct
30 Correct 289 ms 47784 KB Output is correct
31 Correct 357 ms 52644 KB Output is correct
32 Correct 297 ms 52648 KB Output is correct
33 Correct 325 ms 48860 KB Output is correct
34 Correct 6 ms 15708 KB Output is correct
35 Correct 9 ms 16220 KB Output is correct
36 Correct 123 ms 32672 KB Output is correct
37 Correct 195 ms 41896 KB Output is correct
38 Correct 296 ms 50924 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 14936 KB Output is correct
2 Correct 3 ms 15092 KB Output is correct
3 Correct 3 ms 14940 KB Output is correct
4 Correct 3 ms 14940 KB Output is correct
5 Correct 3 ms 14940 KB Output is correct
6 Correct 3 ms 14940 KB Output is correct
7 Correct 3 ms 14940 KB Output is correct
8 Correct 3 ms 14940 KB Output is correct
9 Correct 121 ms 31716 KB Output is correct
10 Correct 10 ms 16728 KB Output is correct
11 Correct 49 ms 23844 KB Output is correct
12 Correct 14 ms 17752 KB Output is correct
13 Correct 30 ms 20936 KB Output is correct
14 Correct 4 ms 14936 KB Output is correct
15 Correct 4 ms 15080 KB Output is correct
16 Correct 122 ms 31616 KB Output is correct
17 Correct 5 ms 14940 KB Output is correct
18 Correct 3 ms 14940 KB Output is correct
19 Correct 3 ms 15192 KB Output is correct
20 Correct 3 ms 14940 KB Output is correct
21 Correct 3 ms 14940 KB Output is correct
22 Correct 3 ms 14940 KB Output is correct
23 Correct 283 ms 48804 KB Output is correct
24 Correct 3 ms 14940 KB Output is correct
25 Correct 4 ms 15196 KB Output is correct
26 Correct 6 ms 15196 KB Output is correct
27 Correct 7 ms 15452 KB Output is correct
28 Correct 98 ms 28448 KB Output is correct
29 Correct 155 ms 35136 KB Output is correct
30 Correct 224 ms 42028 KB Output is correct
31 Correct 277 ms 48808 KB Output is correct
32 Correct 4 ms 14940 KB Output is correct
33 Correct 3 ms 14940 KB Output is correct
34 Correct 3 ms 14940 KB Output is correct
35 Correct 3 ms 14944 KB Output is correct
36 Correct 3 ms 14940 KB Output is correct
37 Correct 3 ms 14952 KB Output is correct
38 Correct 3 ms 14940 KB Output is correct
39 Correct 3 ms 14956 KB Output is correct
40 Correct 3 ms 14940 KB Output is correct
41 Correct 3 ms 14940 KB Output is correct
42 Correct 3 ms 14936 KB Output is correct
43 Correct 4 ms 15256 KB Output is correct
44 Correct 5 ms 15252 KB Output is correct
45 Correct 123 ms 31712 KB Output is correct
46 Correct 193 ms 39308 KB Output is correct
47 Correct 187 ms 39496 KB Output is correct
48 Correct 3 ms 14936 KB Output is correct
49 Correct 3 ms 14940 KB Output is correct
50 Correct 3 ms 14940 KB Output is correct
51 Correct 3 ms 14940 KB Output is correct
52 Correct 3 ms 14940 KB Output is correct
53 Correct 3 ms 14940 KB Output is correct
54 Correct 3 ms 14940 KB Output is correct
55 Correct 307 ms 48884 KB Output is correct
56 Correct 3 ms 14940 KB Output is correct
57 Correct 5 ms 15196 KB Output is correct
58 Correct 10 ms 15944 KB Output is correct
59 Correct 11 ms 16220 KB Output is correct
60 Correct 124 ms 31672 KB Output is correct
61 Correct 176 ms 37540 KB Output is correct
62 Correct 235 ms 42968 KB Output is correct
63 Correct 290 ms 48924 KB Output is correct
64 Correct 3 ms 14940 KB Output is correct
65 Correct 3 ms 14960 KB Output is correct
66 Correct 3 ms 14940 KB Output is correct
67 Correct 282 ms 48888 KB Output is correct
68 Correct 290 ms 48952 KB Output is correct
69 Correct 274 ms 48804 KB Output is correct
70 Correct 5 ms 15704 KB Output is correct
71 Correct 8 ms 15964 KB Output is correct
72 Correct 119 ms 31736 KB Output is correct
73 Correct 189 ms 40356 KB Output is correct
74 Correct 288 ms 48992 KB Output is correct
75 Correct 302 ms 52728 KB Output is correct
76 Correct 268 ms 48808 KB Output is correct
77 Correct 7 ms 15708 KB Output is correct
78 Correct 10 ms 16372 KB Output is correct
79 Correct 136 ms 32576 KB Output is correct
80 Correct 253 ms 41936 KB Output is correct
81 Correct 287 ms 50912 KB Output is correct
82 Correct 3 ms 14940 KB Output is correct
83 Correct 3 ms 14940 KB Output is correct
84 Correct 3 ms 14960 KB Output is correct
85 Correct 228 ms 48808 KB Output is correct
86 Correct 190 ms 48948 KB Output is correct
87 Correct 292 ms 48888 KB Output is correct
88 Correct 219 ms 43820 KB Output is correct
89 Correct 148 ms 30184 KB Output is correct
90 Correct 278 ms 42536 KB Output is correct
91 Correct 280 ms 42508 KB Output is correct
92 Correct 327 ms 48908 KB Output is correct
93 Correct 297 ms 48880 KB Output is correct
94 Correct 363 ms 48984 KB Output is correct
95 Correct 348 ms 48984 KB Output is correct
96 Correct 3 ms 14936 KB Output is correct
97 Correct 19 ms 17500 KB Output is correct
98 Correct 51 ms 22364 KB Output is correct
99 Correct 213 ms 49000 KB Output is correct
100 Correct 11 ms 16216 KB Output is correct
101 Correct 49 ms 21828 KB Output is correct
102 Correct 96 ms 28624 KB Output is correct
103 Correct 100 ms 28408 KB Output is correct
104 Correct 147 ms 33396 KB Output is correct
105 Correct 197 ms 38564 KB Output is correct
106 Correct 276 ms 43804 KB Output is correct
107 Correct 316 ms 48808 KB Output is correct
108 Correct 3 ms 14936 KB Output is correct
109 Correct 3 ms 14940 KB Output is correct
110 Correct 3 ms 14936 KB Output is correct
111 Correct 3 ms 14940 KB Output is correct
112 Correct 3 ms 14936 KB Output is correct
113 Correct 3 ms 14940 KB Output is correct
114 Correct 3 ms 14940 KB Output is correct
115 Correct 3 ms 14940 KB Output is correct
116 Correct 3 ms 14940 KB Output is correct
117 Correct 3 ms 14940 KB Output is correct
118 Correct 3 ms 14940 KB Output is correct
119 Correct 4 ms 15196 KB Output is correct
120 Correct 5 ms 15208 KB Output is correct
121 Correct 119 ms 31800 KB Output is correct
122 Correct 176 ms 39332 KB Output is correct
123 Correct 189 ms 39556 KB Output is correct
124 Correct 3 ms 14940 KB Output is correct
125 Correct 3 ms 14940 KB Output is correct
126 Correct 3 ms 14940 KB Output is correct
127 Correct 271 ms 48880 KB Output is correct
128 Correct 263 ms 48868 KB Output is correct
129 Correct 280 ms 48680 KB Output is correct
130 Correct 6 ms 15452 KB Output is correct
131 Correct 8 ms 15964 KB Output is correct
132 Correct 135 ms 31664 KB Output is correct
133 Correct 198 ms 40364 KB Output is correct
134 Correct 274 ms 48804 KB Output is correct
135 Correct 254 ms 48804 KB Output is correct
136 Correct 267 ms 48824 KB Output is correct
137 Correct 201 ms 48964 KB Output is correct
138 Correct 348 ms 54272 KB Output is correct
139 Correct 292 ms 46504 KB Output is correct
140 Correct 3 ms 14936 KB Output is correct
141 Correct 35 ms 20464 KB Output is correct
142 Correct 18 ms 18012 KB Output is correct
143 Correct 61 ms 25272 KB Output is correct
144 Correct 125 ms 32828 KB Output is correct
145 Correct 157 ms 33572 KB Output is correct
146 Correct 205 ms 38228 KB Output is correct
147 Correct 245 ms 43208 KB Output is correct
148 Correct 289 ms 47784 KB Output is correct
149 Correct 357 ms 52644 KB Output is correct
150 Correct 297 ms 52648 KB Output is correct
151 Correct 325 ms 48860 KB Output is correct
152 Correct 6 ms 15708 KB Output is correct
153 Correct 9 ms 16220 KB Output is correct
154 Correct 123 ms 32672 KB Output is correct
155 Correct 195 ms 41896 KB Output is correct
156 Correct 296 ms 50924 KB Output is correct
157 Correct 4 ms 14936 KB Output is correct
158 Correct 3 ms 14940 KB Output is correct
159 Correct 3 ms 14940 KB Output is correct
160 Correct 3 ms 14940 KB Output is correct
161 Correct 396 ms 48956 KB Output is correct
162 Correct 190 ms 48944 KB Output is correct
163 Correct 177 ms 48808 KB Output is correct
164 Correct 184 ms 48832 KB Output is correct
165 Correct 206 ms 48804 KB Output is correct
166 Correct 235 ms 48956 KB Output is correct
167 Correct 59 ms 22720 KB Output is correct
168 Correct 30 ms 19536 KB Output is correct
169 Correct 71 ms 26860 KB Output is correct
170 Correct 140 ms 37540 KB Output is correct
171 Correct 225 ms 45152 KB Output is correct
172 Correct 152 ms 32920 KB Output is correct
173 Correct 183 ms 36620 KB Output is correct
174 Correct 217 ms 40332 KB Output is correct
175 Correct 251 ms 43816 KB Output is correct
176 Correct 298 ms 47780 KB Output is correct
177 Correct 322 ms 51496 KB Output is correct