Submission #1020601

# Submission time Handle Problem Language Result Execution time Memory
1020601 2024-07-12T07:29:59 Z AliHasanli Traffic (IOI10_traffic) C++17
100 / 100
923 ms 186300 KB
#include "traffic.h"
#include<bits/stdc++.h>
using namespace std;
long long val[1000005],subtree[1000005],ans=1000000000000000000,calc[1000005];
vector<int>g[1000005];
void dfs(int node,int p)
{
    subtree[node]=val[node];
    for(int go:g[node])
        if(go!=p)dfs(go,node),subtree[node]+=subtree[go];
}
void answer(int node,int p)
{
    //cout<<ans<<endl;
    //long long calc=0;
    for(int go:g[node])
    {
        if(go!=p)
        {
            calc[node]=max(calc[node],subtree[go]);
            answer(go,node);
        }
        else calc[node]=max(calc[node],subtree[1]-subtree[node]);
    }
    ans=min(ans,calc[node]);
}
int LocateCentre(int N, int pp[], int S[], int D[]) {
    for(int i=1;i<=N;i++)val[i]=pp[i-1];
    //for(int i=1;i<=N;i++)cout<<val[i]<<" ";cout<<endl;
    for(int i=0;i<N-1;i++)
    g[S[i]+1].push_back(D[i]+1),g[D[i]+1].push_back(S[i]+1);
    dfs(1,0);
    //for(int i=1;i<=N;i++)cout<<subtree[i]<<" ";cout<<endl;
    answer(1,0);
    for(int i=1;i<=N;i++)if(calc[i]==ans)return i-1;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23896 KB Output is correct
2 Correct 12 ms 23896 KB Output is correct
3 Correct 11 ms 23896 KB Output is correct
4 Correct 11 ms 23900 KB Output is correct
5 Correct 11 ms 23900 KB Output is correct
6 Correct 14 ms 23976 KB Output is correct
7 Correct 10 ms 23868 KB Output is correct
8 Correct 12 ms 23900 KB Output is correct
9 Correct 11 ms 23896 KB Output is correct
10 Correct 11 ms 23900 KB Output is correct
11 Correct 11 ms 23900 KB Output is correct
12 Correct 10 ms 23900 KB Output is correct
13 Correct 10 ms 23940 KB Output is correct
14 Correct 12 ms 23900 KB Output is correct
15 Correct 12 ms 23900 KB Output is correct
16 Correct 11 ms 23900 KB Output is correct
17 Correct 12 ms 23900 KB Output is correct
18 Correct 11 ms 23900 KB Output is correct
19 Correct 11 ms 23900 KB Output is correct
20 Correct 11 ms 23928 KB Output is correct
21 Correct 11 ms 23984 KB Output is correct
22 Correct 11 ms 23896 KB Output is correct
23 Correct 11 ms 23900 KB Output is correct
24 Correct 12 ms 23752 KB Output is correct
25 Correct 10 ms 23900 KB Output is correct
26 Correct 11 ms 23900 KB Output is correct
27 Correct 11 ms 23900 KB Output is correct
28 Correct 11 ms 23900 KB Output is correct
29 Correct 14 ms 23900 KB Output is correct
30 Correct 11 ms 23932 KB Output is correct
31 Correct 14 ms 23900 KB Output is correct
32 Correct 14 ms 23968 KB Output is correct
33 Correct 12 ms 23900 KB Output is correct
34 Correct 12 ms 23928 KB Output is correct
35 Correct 12 ms 23900 KB Output is correct
36 Correct 12 ms 23900 KB Output is correct
37 Correct 10 ms 23864 KB Output is correct
38 Correct 11 ms 24072 KB Output is correct
39 Correct 12 ms 23900 KB Output is correct
40 Correct 12 ms 23900 KB Output is correct
41 Correct 11 ms 23884 KB Output is correct
42 Correct 11 ms 23900 KB Output is correct
43 Correct 11 ms 23900 KB Output is correct
44 Correct 11 ms 23900 KB Output is correct
45 Correct 11 ms 23900 KB Output is correct
46 Correct 11 ms 23872 KB Output is correct
47 Correct 11 ms 23900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23896 KB Output is correct
2 Correct 12 ms 23896 KB Output is correct
3 Correct 11 ms 23896 KB Output is correct
4 Correct 11 ms 23900 KB Output is correct
5 Correct 11 ms 23900 KB Output is correct
6 Correct 14 ms 23976 KB Output is correct
7 Correct 10 ms 23868 KB Output is correct
8 Correct 12 ms 23900 KB Output is correct
9 Correct 11 ms 23896 KB Output is correct
10 Correct 11 ms 23900 KB Output is correct
11 Correct 11 ms 23900 KB Output is correct
12 Correct 10 ms 23900 KB Output is correct
13 Correct 10 ms 23940 KB Output is correct
14 Correct 12 ms 23900 KB Output is correct
15 Correct 12 ms 23900 KB Output is correct
16 Correct 11 ms 23900 KB Output is correct
17 Correct 12 ms 23900 KB Output is correct
18 Correct 11 ms 23900 KB Output is correct
19 Correct 11 ms 23900 KB Output is correct
20 Correct 11 ms 23928 KB Output is correct
21 Correct 11 ms 23984 KB Output is correct
22 Correct 11 ms 23896 KB Output is correct
23 Correct 11 ms 23900 KB Output is correct
24 Correct 12 ms 23752 KB Output is correct
25 Correct 10 ms 23900 KB Output is correct
26 Correct 11 ms 23900 KB Output is correct
27 Correct 11 ms 23900 KB Output is correct
28 Correct 11 ms 23900 KB Output is correct
29 Correct 14 ms 23900 KB Output is correct
30 Correct 11 ms 23932 KB Output is correct
31 Correct 14 ms 23900 KB Output is correct
32 Correct 14 ms 23968 KB Output is correct
33 Correct 12 ms 23900 KB Output is correct
34 Correct 12 ms 23928 KB Output is correct
35 Correct 12 ms 23900 KB Output is correct
36 Correct 12 ms 23900 KB Output is correct
37 Correct 10 ms 23864 KB Output is correct
38 Correct 11 ms 24072 KB Output is correct
39 Correct 12 ms 23900 KB Output is correct
40 Correct 12 ms 23900 KB Output is correct
41 Correct 11 ms 23884 KB Output is correct
42 Correct 11 ms 23900 KB Output is correct
43 Correct 11 ms 23900 KB Output is correct
44 Correct 11 ms 23900 KB Output is correct
45 Correct 11 ms 23900 KB Output is correct
46 Correct 11 ms 23872 KB Output is correct
47 Correct 11 ms 23900 KB Output is correct
48 Correct 11 ms 23900 KB Output is correct
49 Correct 11 ms 23900 KB Output is correct
50 Correct 11 ms 23904 KB Output is correct
51 Correct 12 ms 23896 KB Output is correct
52 Correct 12 ms 23904 KB Output is correct
53 Correct 11 ms 23916 KB Output is correct
54 Correct 11 ms 23904 KB Output is correct
55 Correct 11 ms 23904 KB Output is correct
56 Correct 11 ms 23928 KB Output is correct
57 Correct 11 ms 23900 KB Output is correct
58 Correct 10 ms 23900 KB Output is correct
59 Correct 11 ms 23788 KB Output is correct
60 Correct 11 ms 23904 KB Output is correct
61 Correct 11 ms 23924 KB Output is correct
62 Correct 10 ms 23900 KB Output is correct
63 Correct 11 ms 23932 KB Output is correct
64 Correct 11 ms 23896 KB Output is correct
65 Correct 12 ms 23932 KB Output is correct
66 Correct 11 ms 23932 KB Output is correct
67 Correct 14 ms 24156 KB Output is correct
68 Correct 27 ms 31996 KB Output is correct
69 Correct 44 ms 40020 KB Output is correct
70 Correct 11 ms 23896 KB Output is correct
71 Correct 61 ms 48212 KB Output is correct
72 Correct 80 ms 56288 KB Output is correct
73 Correct 97 ms 64524 KB Output is correct
74 Correct 114 ms 72712 KB Output is correct
75 Correct 162 ms 80652 KB Output is correct
76 Correct 149 ms 88912 KB Output is correct
77 Correct 166 ms 97156 KB Output is correct
78 Correct 183 ms 105176 KB Output is correct
79 Correct 201 ms 113208 KB Output is correct
80 Correct 226 ms 121428 KB Output is correct
81 Correct 11 ms 23896 KB Output is correct
82 Correct 235 ms 129564 KB Output is correct
83 Correct 318 ms 137628 KB Output is correct
84 Correct 270 ms 145744 KB Output is correct
85 Correct 304 ms 153944 KB Output is correct
86 Correct 311 ms 162128 KB Output is correct
87 Correct 360 ms 170328 KB Output is correct
88 Correct 351 ms 178260 KB Output is correct
89 Correct 355 ms 186300 KB Output is correct
90 Correct 11 ms 23896 KB Output is correct
91 Correct 10 ms 23976 KB Output is correct
92 Correct 10 ms 23892 KB Output is correct
93 Correct 11 ms 23900 KB Output is correct
94 Correct 11 ms 23896 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23896 KB Output is correct
2 Correct 12 ms 23896 KB Output is correct
3 Correct 11 ms 23896 KB Output is correct
4 Correct 11 ms 23900 KB Output is correct
5 Correct 11 ms 23900 KB Output is correct
6 Correct 14 ms 23976 KB Output is correct
7 Correct 10 ms 23868 KB Output is correct
8 Correct 12 ms 23900 KB Output is correct
9 Correct 11 ms 23896 KB Output is correct
10 Correct 11 ms 23900 KB Output is correct
11 Correct 11 ms 23900 KB Output is correct
12 Correct 10 ms 23900 KB Output is correct
13 Correct 10 ms 23940 KB Output is correct
14 Correct 12 ms 23900 KB Output is correct
15 Correct 12 ms 23900 KB Output is correct
16 Correct 11 ms 23900 KB Output is correct
17 Correct 12 ms 23900 KB Output is correct
18 Correct 11 ms 23900 KB Output is correct
19 Correct 11 ms 23900 KB Output is correct
20 Correct 11 ms 23928 KB Output is correct
21 Correct 11 ms 23984 KB Output is correct
22 Correct 11 ms 23896 KB Output is correct
23 Correct 11 ms 23900 KB Output is correct
24 Correct 12 ms 23752 KB Output is correct
25 Correct 10 ms 23900 KB Output is correct
26 Correct 11 ms 23900 KB Output is correct
27 Correct 11 ms 23900 KB Output is correct
28 Correct 11 ms 23900 KB Output is correct
29 Correct 14 ms 23900 KB Output is correct
30 Correct 11 ms 23932 KB Output is correct
31 Correct 14 ms 23900 KB Output is correct
32 Correct 14 ms 23968 KB Output is correct
33 Correct 12 ms 23900 KB Output is correct
34 Correct 12 ms 23928 KB Output is correct
35 Correct 12 ms 23900 KB Output is correct
36 Correct 12 ms 23900 KB Output is correct
37 Correct 10 ms 23864 KB Output is correct
38 Correct 11 ms 24072 KB Output is correct
39 Correct 12 ms 23900 KB Output is correct
40 Correct 12 ms 23900 KB Output is correct
41 Correct 11 ms 23884 KB Output is correct
42 Correct 11 ms 23900 KB Output is correct
43 Correct 11 ms 23900 KB Output is correct
44 Correct 11 ms 23900 KB Output is correct
45 Correct 11 ms 23900 KB Output is correct
46 Correct 11 ms 23872 KB Output is correct
47 Correct 11 ms 23900 KB Output is correct
48 Correct 11 ms 23900 KB Output is correct
49 Correct 9 ms 23900 KB Output is correct
50 Correct 11 ms 23868 KB Output is correct
51 Correct 10 ms 23896 KB Output is correct
52 Correct 10 ms 23900 KB Output is correct
53 Correct 10 ms 23928 KB Output is correct
54 Correct 11 ms 23896 KB Output is correct
55 Correct 11 ms 23896 KB Output is correct
56 Correct 10 ms 23924 KB Output is correct
57 Correct 10 ms 23900 KB Output is correct
58 Correct 10 ms 23900 KB Output is correct
59 Correct 11 ms 23792 KB Output is correct
60 Correct 12 ms 23932 KB Output is correct
61 Correct 12 ms 23896 KB Output is correct
62 Correct 11 ms 23900 KB Output is correct
63 Correct 10 ms 23912 KB Output is correct
64 Correct 11 ms 23896 KB Output is correct
65 Correct 11 ms 23896 KB Output is correct
66 Correct 11 ms 23900 KB Output is correct
67 Correct 10 ms 23900 KB Output is correct
68 Correct 10 ms 23900 KB Output is correct
69 Correct 10 ms 23900 KB Output is correct
70 Correct 10 ms 24152 KB Output is correct
71 Correct 11 ms 23900 KB Output is correct
72 Correct 10 ms 23900 KB Output is correct
73 Correct 11 ms 23896 KB Output is correct
74 Correct 10 ms 23900 KB Output is correct
75 Correct 10 ms 23900 KB Output is correct
76 Correct 11 ms 23900 KB Output is correct
77 Correct 12 ms 23940 KB Output is correct
78 Correct 11 ms 23900 KB Output is correct
79 Correct 11 ms 23900 KB Output is correct
80 Correct 10 ms 23900 KB Output is correct
81 Correct 11 ms 23844 KB Output is correct
82 Correct 11 ms 23900 KB Output is correct
83 Correct 13 ms 23896 KB Output is correct
84 Correct 10 ms 23804 KB Output is correct
85 Correct 11 ms 24152 KB Output is correct
86 Correct 11 ms 23900 KB Output is correct
87 Correct 11 ms 23896 KB Output is correct
88 Correct 12 ms 23900 KB Output is correct
89 Correct 12 ms 23900 KB Output is correct
90 Correct 11 ms 23900 KB Output is correct
91 Correct 10 ms 23884 KB Output is correct
92 Correct 11 ms 23900 KB Output is correct
93 Correct 12 ms 23900 KB Output is correct
94 Correct 10 ms 23868 KB Output is correct
95 Correct 10 ms 23900 KB Output is correct
96 Correct 11 ms 23900 KB Output is correct
97 Correct 11 ms 23972 KB Output is correct
98 Correct 10 ms 23900 KB Output is correct
99 Correct 10 ms 23816 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 12 ms 23896 KB Output is correct
2 Correct 12 ms 23896 KB Output is correct
3 Correct 11 ms 23896 KB Output is correct
4 Correct 11 ms 23900 KB Output is correct
5 Correct 11 ms 23900 KB Output is correct
6 Correct 14 ms 23976 KB Output is correct
7 Correct 10 ms 23868 KB Output is correct
8 Correct 12 ms 23900 KB Output is correct
9 Correct 11 ms 23896 KB Output is correct
10 Correct 11 ms 23900 KB Output is correct
11 Correct 11 ms 23900 KB Output is correct
12 Correct 10 ms 23900 KB Output is correct
13 Correct 10 ms 23940 KB Output is correct
14 Correct 12 ms 23900 KB Output is correct
15 Correct 12 ms 23900 KB Output is correct
16 Correct 11 ms 23900 KB Output is correct
17 Correct 12 ms 23900 KB Output is correct
18 Correct 11 ms 23900 KB Output is correct
19 Correct 11 ms 23900 KB Output is correct
20 Correct 11 ms 23928 KB Output is correct
21 Correct 11 ms 23984 KB Output is correct
22 Correct 11 ms 23896 KB Output is correct
23 Correct 11 ms 23900 KB Output is correct
24 Correct 12 ms 23752 KB Output is correct
25 Correct 10 ms 23900 KB Output is correct
26 Correct 11 ms 23900 KB Output is correct
27 Correct 11 ms 23900 KB Output is correct
28 Correct 11 ms 23900 KB Output is correct
29 Correct 14 ms 23900 KB Output is correct
30 Correct 11 ms 23932 KB Output is correct
31 Correct 14 ms 23900 KB Output is correct
32 Correct 14 ms 23968 KB Output is correct
33 Correct 12 ms 23900 KB Output is correct
34 Correct 12 ms 23928 KB Output is correct
35 Correct 12 ms 23900 KB Output is correct
36 Correct 12 ms 23900 KB Output is correct
37 Correct 10 ms 23864 KB Output is correct
38 Correct 11 ms 24072 KB Output is correct
39 Correct 12 ms 23900 KB Output is correct
40 Correct 12 ms 23900 KB Output is correct
41 Correct 11 ms 23884 KB Output is correct
42 Correct 11 ms 23900 KB Output is correct
43 Correct 11 ms 23900 KB Output is correct
44 Correct 11 ms 23900 KB Output is correct
45 Correct 11 ms 23900 KB Output is correct
46 Correct 11 ms 23872 KB Output is correct
47 Correct 11 ms 23900 KB Output is correct
48 Correct 11 ms 23900 KB Output is correct
49 Correct 11 ms 23900 KB Output is correct
50 Correct 11 ms 23904 KB Output is correct
51 Correct 12 ms 23896 KB Output is correct
52 Correct 12 ms 23904 KB Output is correct
53 Correct 11 ms 23916 KB Output is correct
54 Correct 11 ms 23904 KB Output is correct
55 Correct 11 ms 23904 KB Output is correct
56 Correct 11 ms 23928 KB Output is correct
57 Correct 11 ms 23900 KB Output is correct
58 Correct 10 ms 23900 KB Output is correct
59 Correct 11 ms 23788 KB Output is correct
60 Correct 11 ms 23904 KB Output is correct
61 Correct 11 ms 23924 KB Output is correct
62 Correct 10 ms 23900 KB Output is correct
63 Correct 11 ms 23932 KB Output is correct
64 Correct 11 ms 23896 KB Output is correct
65 Correct 12 ms 23932 KB Output is correct
66 Correct 11 ms 23932 KB Output is correct
67 Correct 14 ms 24156 KB Output is correct
68 Correct 27 ms 31996 KB Output is correct
69 Correct 44 ms 40020 KB Output is correct
70 Correct 11 ms 23896 KB Output is correct
71 Correct 61 ms 48212 KB Output is correct
72 Correct 80 ms 56288 KB Output is correct
73 Correct 97 ms 64524 KB Output is correct
74 Correct 114 ms 72712 KB Output is correct
75 Correct 162 ms 80652 KB Output is correct
76 Correct 149 ms 88912 KB Output is correct
77 Correct 166 ms 97156 KB Output is correct
78 Correct 183 ms 105176 KB Output is correct
79 Correct 201 ms 113208 KB Output is correct
80 Correct 226 ms 121428 KB Output is correct
81 Correct 11 ms 23896 KB Output is correct
82 Correct 235 ms 129564 KB Output is correct
83 Correct 318 ms 137628 KB Output is correct
84 Correct 270 ms 145744 KB Output is correct
85 Correct 304 ms 153944 KB Output is correct
86 Correct 311 ms 162128 KB Output is correct
87 Correct 360 ms 170328 KB Output is correct
88 Correct 351 ms 178260 KB Output is correct
89 Correct 355 ms 186300 KB Output is correct
90 Correct 11 ms 23896 KB Output is correct
91 Correct 10 ms 23976 KB Output is correct
92 Correct 10 ms 23892 KB Output is correct
93 Correct 11 ms 23900 KB Output is correct
94 Correct 11 ms 23896 KB Output is correct
95 Correct 11 ms 23900 KB Output is correct
96 Correct 9 ms 23900 KB Output is correct
97 Correct 11 ms 23868 KB Output is correct
98 Correct 10 ms 23896 KB Output is correct
99 Correct 10 ms 23900 KB Output is correct
100 Correct 10 ms 23928 KB Output is correct
101 Correct 11 ms 23896 KB Output is correct
102 Correct 11 ms 23896 KB Output is correct
103 Correct 10 ms 23924 KB Output is correct
104 Correct 10 ms 23900 KB Output is correct
105 Correct 10 ms 23900 KB Output is correct
106 Correct 11 ms 23792 KB Output is correct
107 Correct 12 ms 23932 KB Output is correct
108 Correct 12 ms 23896 KB Output is correct
109 Correct 11 ms 23900 KB Output is correct
110 Correct 10 ms 23912 KB Output is correct
111 Correct 11 ms 23896 KB Output is correct
112 Correct 11 ms 23896 KB Output is correct
113 Correct 11 ms 23900 KB Output is correct
114 Correct 10 ms 23900 KB Output is correct
115 Correct 10 ms 23900 KB Output is correct
116 Correct 10 ms 23900 KB Output is correct
117 Correct 10 ms 24152 KB Output is correct
118 Correct 11 ms 23900 KB Output is correct
119 Correct 10 ms 23900 KB Output is correct
120 Correct 11 ms 23896 KB Output is correct
121 Correct 10 ms 23900 KB Output is correct
122 Correct 10 ms 23900 KB Output is correct
123 Correct 11 ms 23900 KB Output is correct
124 Correct 12 ms 23940 KB Output is correct
125 Correct 11 ms 23900 KB Output is correct
126 Correct 11 ms 23900 KB Output is correct
127 Correct 10 ms 23900 KB Output is correct
128 Correct 11 ms 23844 KB Output is correct
129 Correct 11 ms 23900 KB Output is correct
130 Correct 13 ms 23896 KB Output is correct
131 Correct 10 ms 23804 KB Output is correct
132 Correct 11 ms 24152 KB Output is correct
133 Correct 11 ms 23900 KB Output is correct
134 Correct 11 ms 23896 KB Output is correct
135 Correct 12 ms 23900 KB Output is correct
136 Correct 12 ms 23900 KB Output is correct
137 Correct 11 ms 23900 KB Output is correct
138 Correct 10 ms 23884 KB Output is correct
139 Correct 11 ms 23900 KB Output is correct
140 Correct 12 ms 23900 KB Output is correct
141 Correct 10 ms 23868 KB Output is correct
142 Correct 10 ms 23900 KB Output is correct
143 Correct 11 ms 23900 KB Output is correct
144 Correct 11 ms 23972 KB Output is correct
145 Correct 10 ms 23900 KB Output is correct
146 Correct 10 ms 23816 KB Output is correct
147 Correct 11 ms 23900 KB Output is correct
148 Correct 11 ms 23900 KB Output is correct
149 Correct 11 ms 23896 KB Output is correct
150 Correct 10 ms 23896 KB Output is correct
151 Correct 11 ms 23928 KB Output is correct
152 Correct 10 ms 23900 KB Output is correct
153 Correct 15 ms 23928 KB Output is correct
154 Correct 11 ms 23900 KB Output is correct
155 Correct 11 ms 23744 KB Output is correct
156 Correct 11 ms 23896 KB Output is correct
157 Correct 11 ms 23900 KB Output is correct
158 Correct 12 ms 23896 KB Output is correct
159 Correct 10 ms 23896 KB Output is correct
160 Correct 11 ms 23900 KB Output is correct
161 Correct 11 ms 23900 KB Output is correct
162 Correct 10 ms 23900 KB Output is correct
163 Correct 11 ms 23892 KB Output is correct
164 Correct 15 ms 23936 KB Output is correct
165 Correct 10 ms 23836 KB Output is correct
166 Correct 10 ms 23900 KB Output is correct
167 Correct 11 ms 23900 KB Output is correct
168 Correct 11 ms 23896 KB Output is correct
169 Correct 11 ms 23896 KB Output is correct
170 Correct 11 ms 23900 KB Output is correct
171 Correct 31 ms 27996 KB Output is correct
172 Correct 55 ms 32340 KB Output is correct
173 Correct 76 ms 36416 KB Output is correct
174 Correct 108 ms 40876 KB Output is correct
175 Correct 124 ms 44940 KB Output is correct
176 Correct 166 ms 49236 KB Output is correct
177 Correct 185 ms 53840 KB Output is correct
178 Correct 221 ms 57684 KB Output is correct
179 Correct 281 ms 62032 KB Output is correct
180 Correct 11 ms 23896 KB Output is correct
181 Correct 311 ms 66296 KB Output is correct
182 Correct 379 ms 70524 KB Output is correct
183 Correct 444 ms 74832 KB Output is correct
184 Correct 489 ms 79084 KB Output is correct
185 Correct 569 ms 83260 KB Output is correct
186 Correct 609 ms 87824 KB Output is correct
187 Correct 673 ms 91812 KB Output is correct
188 Correct 710 ms 96120 KB Output is correct
189 Correct 751 ms 100180 KB Output is correct
190 Correct 879 ms 104540 KB Output is correct
191 Correct 10 ms 23900 KB Output is correct
192 Correct 923 ms 108628 KB Output is correct
193 Correct 196 ms 103756 KB Output is correct
194 Correct 378 ms 184148 KB Output is correct
195 Correct 11 ms 23900 KB Output is correct
196 Correct 11 ms 23900 KB Output is correct
197 Correct 11 ms 23940 KB Output is correct
198 Correct 12 ms 23964 KB Output is correct