답안 #241621

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
241621 2020-06-24T19:20:00 Z lakshith_ Traffic (IOI10_traffic) C++14
100 / 100
1489 ms 182644 KB
#include <bits/stdc++.h>
#include "traffic.h"
#define pb push_back

using namespace std;

vector<vector<int>> adjList(1000000,vector<int>());
int MIN = INT_MAX;
int MINPOS = 0;

int sz[1000000];

int setup(int n,int s,int*p){
  sz[n] = p[n];
  for(int x:adjList.at(n))
    if(x!=s)
      sz[n]+=setup(x,n,p);
  return sz[n];
}

void DFS(int n,int s,int prev,int* p){
  int MAX = prev;
  for(int x:adjList.at(n))
    if(x!=s){
      DFS(x,n,prev+sz[n]-sz[x],p);
      MAX = max(MAX,sz[x]);
    }
  if(MIN>MAX){
    MIN = MAX;
    MINPOS = n;
  }
}

int LocateCentre(int n,int p[],int s[],int d[]){
  for(int i=0;i<n-1;i++){
    adjList.at(s[i]).pb(d[i]);
    adjList.at(d[i]).pb(s[i]);
  }
  setup(0,0,p);
  DFS(0,0,0,p);
  return MINPOS;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 23808 KB Output is correct
2 Correct 19 ms 23808 KB Output is correct
3 Correct 19 ms 23808 KB Output is correct
4 Correct 18 ms 23808 KB Output is correct
5 Correct 19 ms 23808 KB Output is correct
6 Correct 19 ms 23808 KB Output is correct
7 Correct 21 ms 23808 KB Output is correct
8 Correct 21 ms 23808 KB Output is correct
9 Correct 19 ms 23808 KB Output is correct
10 Correct 19 ms 23808 KB Output is correct
11 Correct 21 ms 23808 KB Output is correct
12 Correct 19 ms 23808 KB Output is correct
13 Correct 20 ms 23808 KB Output is correct
14 Correct 19 ms 23680 KB Output is correct
15 Correct 19 ms 23808 KB Output is correct
16 Correct 18 ms 23808 KB Output is correct
17 Correct 18 ms 23808 KB Output is correct
18 Correct 20 ms 23808 KB Output is correct
19 Correct 19 ms 23808 KB Output is correct
20 Correct 20 ms 23808 KB Output is correct
21 Correct 19 ms 23808 KB Output is correct
22 Correct 20 ms 23808 KB Output is correct
23 Correct 23 ms 23808 KB Output is correct
24 Correct 19 ms 23936 KB Output is correct
25 Correct 23 ms 23808 KB Output is correct
26 Correct 19 ms 23808 KB Output is correct
27 Correct 19 ms 23808 KB Output is correct
28 Correct 19 ms 23936 KB Output is correct
29 Correct 20 ms 23936 KB Output is correct
30 Correct 19 ms 23936 KB Output is correct
31 Correct 20 ms 23936 KB Output is correct
32 Correct 20 ms 23936 KB Output is correct
33 Correct 19 ms 23936 KB Output is correct
34 Correct 19 ms 23808 KB Output is correct
35 Correct 19 ms 23936 KB Output is correct
36 Correct 19 ms 23936 KB Output is correct
37 Correct 19 ms 23936 KB Output is correct
38 Correct 20 ms 23936 KB Output is correct
39 Correct 19 ms 23936 KB Output is correct
40 Correct 19 ms 23936 KB Output is correct
41 Correct 19 ms 23936 KB Output is correct
42 Correct 19 ms 23936 KB Output is correct
43 Correct 19 ms 23808 KB Output is correct
44 Correct 21 ms 23808 KB Output is correct
45 Correct 19 ms 23808 KB Output is correct
46 Correct 20 ms 23808 KB Output is correct
47 Correct 19 ms 23808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 23808 KB Output is correct
2 Correct 19 ms 23808 KB Output is correct
3 Correct 19 ms 23808 KB Output is correct
4 Correct 18 ms 23808 KB Output is correct
5 Correct 19 ms 23808 KB Output is correct
6 Correct 19 ms 23808 KB Output is correct
7 Correct 21 ms 23808 KB Output is correct
8 Correct 21 ms 23808 KB Output is correct
9 Correct 19 ms 23808 KB Output is correct
10 Correct 19 ms 23808 KB Output is correct
11 Correct 21 ms 23808 KB Output is correct
12 Correct 19 ms 23808 KB Output is correct
13 Correct 20 ms 23808 KB Output is correct
14 Correct 19 ms 23680 KB Output is correct
15 Correct 19 ms 23808 KB Output is correct
16 Correct 18 ms 23808 KB Output is correct
17 Correct 18 ms 23808 KB Output is correct
18 Correct 20 ms 23808 KB Output is correct
19 Correct 19 ms 23808 KB Output is correct
20 Correct 20 ms 23808 KB Output is correct
21 Correct 19 ms 23808 KB Output is correct
22 Correct 20 ms 23808 KB Output is correct
23 Correct 23 ms 23808 KB Output is correct
24 Correct 19 ms 23936 KB Output is correct
25 Correct 23 ms 23808 KB Output is correct
26 Correct 19 ms 23808 KB Output is correct
27 Correct 19 ms 23808 KB Output is correct
28 Correct 19 ms 23936 KB Output is correct
29 Correct 20 ms 23936 KB Output is correct
30 Correct 19 ms 23936 KB Output is correct
31 Correct 20 ms 23936 KB Output is correct
32 Correct 20 ms 23936 KB Output is correct
33 Correct 19 ms 23936 KB Output is correct
34 Correct 19 ms 23808 KB Output is correct
35 Correct 19 ms 23936 KB Output is correct
36 Correct 19 ms 23936 KB Output is correct
37 Correct 19 ms 23936 KB Output is correct
38 Correct 20 ms 23936 KB Output is correct
39 Correct 19 ms 23936 KB Output is correct
40 Correct 19 ms 23936 KB Output is correct
41 Correct 19 ms 23936 KB Output is correct
42 Correct 19 ms 23936 KB Output is correct
43 Correct 19 ms 23808 KB Output is correct
44 Correct 21 ms 23808 KB Output is correct
45 Correct 19 ms 23808 KB Output is correct
46 Correct 20 ms 23808 KB Output is correct
47 Correct 19 ms 23808 KB Output is correct
48 Correct 21 ms 23808 KB Output is correct
49 Correct 21 ms 23808 KB Output is correct
50 Correct 19 ms 23808 KB Output is correct
51 Correct 19 ms 23808 KB Output is correct
52 Correct 19 ms 23808 KB Output is correct
53 Correct 20 ms 23808 KB Output is correct
54 Correct 18 ms 23808 KB Output is correct
55 Correct 22 ms 23808 KB Output is correct
56 Correct 19 ms 23808 KB Output is correct
57 Correct 22 ms 23808 KB Output is correct
58 Correct 24 ms 23808 KB Output is correct
59 Correct 19 ms 23808 KB Output is correct
60 Correct 19 ms 23808 KB Output is correct
61 Correct 20 ms 23808 KB Output is correct
62 Correct 19 ms 23808 KB Output is correct
63 Correct 19 ms 23808 KB Output is correct
64 Correct 19 ms 23808 KB Output is correct
65 Correct 19 ms 23808 KB Output is correct
66 Correct 21 ms 23808 KB Output is correct
67 Correct 19 ms 23808 KB Output is correct
68 Correct 48 ms 30840 KB Output is correct
69 Correct 76 ms 39672 KB Output is correct
70 Correct 21 ms 23808 KB Output is correct
71 Correct 111 ms 47536 KB Output is correct
72 Correct 140 ms 55544 KB Output is correct
73 Correct 162 ms 63480 KB Output is correct
74 Correct 197 ms 71420 KB Output is correct
75 Correct 224 ms 79352 KB Output is correct
76 Correct 267 ms 87340 KB Output is correct
77 Correct 284 ms 95352 KB Output is correct
78 Correct 314 ms 103416 KB Output is correct
79 Correct 338 ms 111224 KB Output is correct
80 Correct 365 ms 119160 KB Output is correct
81 Correct 19 ms 23808 KB Output is correct
82 Correct 405 ms 127096 KB Output is correct
83 Correct 445 ms 134904 KB Output is correct
84 Correct 455 ms 142968 KB Output is correct
85 Correct 496 ms 150904 KB Output is correct
86 Correct 521 ms 158712 KB Output is correct
87 Correct 545 ms 166648 KB Output is correct
88 Correct 576 ms 174584 KB Output is correct
89 Correct 609 ms 182644 KB Output is correct
90 Correct 19 ms 23808 KB Output is correct
91 Correct 19 ms 23808 KB Output is correct
92 Correct 18 ms 23808 KB Output is correct
93 Correct 19 ms 23808 KB Output is correct
94 Correct 19 ms 23808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 23808 KB Output is correct
2 Correct 19 ms 23808 KB Output is correct
3 Correct 19 ms 23808 KB Output is correct
4 Correct 18 ms 23808 KB Output is correct
5 Correct 19 ms 23808 KB Output is correct
6 Correct 19 ms 23808 KB Output is correct
7 Correct 21 ms 23808 KB Output is correct
8 Correct 21 ms 23808 KB Output is correct
9 Correct 19 ms 23808 KB Output is correct
10 Correct 19 ms 23808 KB Output is correct
11 Correct 21 ms 23808 KB Output is correct
12 Correct 19 ms 23808 KB Output is correct
13 Correct 20 ms 23808 KB Output is correct
14 Correct 19 ms 23680 KB Output is correct
15 Correct 19 ms 23808 KB Output is correct
16 Correct 18 ms 23808 KB Output is correct
17 Correct 18 ms 23808 KB Output is correct
18 Correct 20 ms 23808 KB Output is correct
19 Correct 19 ms 23808 KB Output is correct
20 Correct 20 ms 23808 KB Output is correct
21 Correct 19 ms 23808 KB Output is correct
22 Correct 20 ms 23808 KB Output is correct
23 Correct 23 ms 23808 KB Output is correct
24 Correct 19 ms 23936 KB Output is correct
25 Correct 23 ms 23808 KB Output is correct
26 Correct 19 ms 23808 KB Output is correct
27 Correct 19 ms 23808 KB Output is correct
28 Correct 19 ms 23936 KB Output is correct
29 Correct 20 ms 23936 KB Output is correct
30 Correct 19 ms 23936 KB Output is correct
31 Correct 20 ms 23936 KB Output is correct
32 Correct 20 ms 23936 KB Output is correct
33 Correct 19 ms 23936 KB Output is correct
34 Correct 19 ms 23808 KB Output is correct
35 Correct 19 ms 23936 KB Output is correct
36 Correct 19 ms 23936 KB Output is correct
37 Correct 19 ms 23936 KB Output is correct
38 Correct 20 ms 23936 KB Output is correct
39 Correct 19 ms 23936 KB Output is correct
40 Correct 19 ms 23936 KB Output is correct
41 Correct 19 ms 23936 KB Output is correct
42 Correct 19 ms 23936 KB Output is correct
43 Correct 19 ms 23808 KB Output is correct
44 Correct 21 ms 23808 KB Output is correct
45 Correct 19 ms 23808 KB Output is correct
46 Correct 20 ms 23808 KB Output is correct
47 Correct 19 ms 23808 KB Output is correct
48 Correct 19 ms 23956 KB Output is correct
49 Correct 20 ms 23808 KB Output is correct
50 Correct 19 ms 23808 KB Output is correct
51 Correct 19 ms 23808 KB Output is correct
52 Correct 21 ms 23808 KB Output is correct
53 Correct 21 ms 23808 KB Output is correct
54 Correct 19 ms 23936 KB Output is correct
55 Correct 19 ms 23808 KB Output is correct
56 Correct 18 ms 23808 KB Output is correct
57 Correct 23 ms 23808 KB Output is correct
58 Correct 18 ms 23808 KB Output is correct
59 Correct 19 ms 23808 KB Output is correct
60 Correct 19 ms 23808 KB Output is correct
61 Correct 24 ms 23936 KB Output is correct
62 Correct 19 ms 23936 KB Output is correct
63 Correct 19 ms 23808 KB Output is correct
64 Correct 19 ms 23808 KB Output is correct
65 Correct 20 ms 23808 KB Output is correct
66 Correct 21 ms 23808 KB Output is correct
67 Correct 19 ms 23808 KB Output is correct
68 Correct 18 ms 23808 KB Output is correct
69 Correct 21 ms 23808 KB Output is correct
70 Correct 20 ms 23808 KB Output is correct
71 Correct 19 ms 23936 KB Output is correct
72 Correct 19 ms 23808 KB Output is correct
73 Correct 20 ms 23808 KB Output is correct
74 Correct 19 ms 23808 KB Output is correct
75 Correct 19 ms 23808 KB Output is correct
76 Correct 19 ms 23808 KB Output is correct
77 Correct 19 ms 23808 KB Output is correct
78 Correct 22 ms 23936 KB Output is correct
79 Correct 19 ms 23808 KB Output is correct
80 Correct 19 ms 23808 KB Output is correct
81 Correct 18 ms 23808 KB Output is correct
82 Correct 21 ms 23936 KB Output is correct
83 Correct 19 ms 23808 KB Output is correct
84 Correct 19 ms 23936 KB Output is correct
85 Correct 19 ms 23936 KB Output is correct
86 Correct 19 ms 23936 KB Output is correct
87 Correct 19 ms 23936 KB Output is correct
88 Correct 19 ms 23936 KB Output is correct
89 Correct 19 ms 23936 KB Output is correct
90 Correct 19 ms 23936 KB Output is correct
91 Correct 19 ms 23936 KB Output is correct
92 Correct 18 ms 23808 KB Output is correct
93 Correct 20 ms 23936 KB Output is correct
94 Correct 19 ms 23936 KB Output is correct
95 Correct 19 ms 24064 KB Output is correct
96 Correct 20 ms 23936 KB Output is correct
97 Correct 19 ms 23808 KB Output is correct
98 Correct 19 ms 23808 KB Output is correct
99 Correct 19 ms 23808 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 23808 KB Output is correct
2 Correct 19 ms 23808 KB Output is correct
3 Correct 19 ms 23808 KB Output is correct
4 Correct 18 ms 23808 KB Output is correct
5 Correct 19 ms 23808 KB Output is correct
6 Correct 19 ms 23808 KB Output is correct
7 Correct 21 ms 23808 KB Output is correct
8 Correct 21 ms 23808 KB Output is correct
9 Correct 19 ms 23808 KB Output is correct
10 Correct 19 ms 23808 KB Output is correct
11 Correct 21 ms 23808 KB Output is correct
12 Correct 19 ms 23808 KB Output is correct
13 Correct 20 ms 23808 KB Output is correct
14 Correct 19 ms 23680 KB Output is correct
15 Correct 19 ms 23808 KB Output is correct
16 Correct 18 ms 23808 KB Output is correct
17 Correct 18 ms 23808 KB Output is correct
18 Correct 20 ms 23808 KB Output is correct
19 Correct 19 ms 23808 KB Output is correct
20 Correct 20 ms 23808 KB Output is correct
21 Correct 19 ms 23808 KB Output is correct
22 Correct 20 ms 23808 KB Output is correct
23 Correct 23 ms 23808 KB Output is correct
24 Correct 19 ms 23936 KB Output is correct
25 Correct 23 ms 23808 KB Output is correct
26 Correct 19 ms 23808 KB Output is correct
27 Correct 19 ms 23808 KB Output is correct
28 Correct 19 ms 23936 KB Output is correct
29 Correct 20 ms 23936 KB Output is correct
30 Correct 19 ms 23936 KB Output is correct
31 Correct 20 ms 23936 KB Output is correct
32 Correct 20 ms 23936 KB Output is correct
33 Correct 19 ms 23936 KB Output is correct
34 Correct 19 ms 23808 KB Output is correct
35 Correct 19 ms 23936 KB Output is correct
36 Correct 19 ms 23936 KB Output is correct
37 Correct 19 ms 23936 KB Output is correct
38 Correct 20 ms 23936 KB Output is correct
39 Correct 19 ms 23936 KB Output is correct
40 Correct 19 ms 23936 KB Output is correct
41 Correct 19 ms 23936 KB Output is correct
42 Correct 19 ms 23936 KB Output is correct
43 Correct 19 ms 23808 KB Output is correct
44 Correct 21 ms 23808 KB Output is correct
45 Correct 19 ms 23808 KB Output is correct
46 Correct 20 ms 23808 KB Output is correct
47 Correct 19 ms 23808 KB Output is correct
48 Correct 21 ms 23808 KB Output is correct
49 Correct 21 ms 23808 KB Output is correct
50 Correct 19 ms 23808 KB Output is correct
51 Correct 19 ms 23808 KB Output is correct
52 Correct 19 ms 23808 KB Output is correct
53 Correct 20 ms 23808 KB Output is correct
54 Correct 18 ms 23808 KB Output is correct
55 Correct 22 ms 23808 KB Output is correct
56 Correct 19 ms 23808 KB Output is correct
57 Correct 22 ms 23808 KB Output is correct
58 Correct 24 ms 23808 KB Output is correct
59 Correct 19 ms 23808 KB Output is correct
60 Correct 19 ms 23808 KB Output is correct
61 Correct 20 ms 23808 KB Output is correct
62 Correct 19 ms 23808 KB Output is correct
63 Correct 19 ms 23808 KB Output is correct
64 Correct 19 ms 23808 KB Output is correct
65 Correct 19 ms 23808 KB Output is correct
66 Correct 21 ms 23808 KB Output is correct
67 Correct 19 ms 23808 KB Output is correct
68 Correct 48 ms 30840 KB Output is correct
69 Correct 76 ms 39672 KB Output is correct
70 Correct 21 ms 23808 KB Output is correct
71 Correct 111 ms 47536 KB Output is correct
72 Correct 140 ms 55544 KB Output is correct
73 Correct 162 ms 63480 KB Output is correct
74 Correct 197 ms 71420 KB Output is correct
75 Correct 224 ms 79352 KB Output is correct
76 Correct 267 ms 87340 KB Output is correct
77 Correct 284 ms 95352 KB Output is correct
78 Correct 314 ms 103416 KB Output is correct
79 Correct 338 ms 111224 KB Output is correct
80 Correct 365 ms 119160 KB Output is correct
81 Correct 19 ms 23808 KB Output is correct
82 Correct 405 ms 127096 KB Output is correct
83 Correct 445 ms 134904 KB Output is correct
84 Correct 455 ms 142968 KB Output is correct
85 Correct 496 ms 150904 KB Output is correct
86 Correct 521 ms 158712 KB Output is correct
87 Correct 545 ms 166648 KB Output is correct
88 Correct 576 ms 174584 KB Output is correct
89 Correct 609 ms 182644 KB Output is correct
90 Correct 19 ms 23808 KB Output is correct
91 Correct 19 ms 23808 KB Output is correct
92 Correct 18 ms 23808 KB Output is correct
93 Correct 19 ms 23808 KB Output is correct
94 Correct 19 ms 23808 KB Output is correct
95 Correct 19 ms 23956 KB Output is correct
96 Correct 20 ms 23808 KB Output is correct
97 Correct 19 ms 23808 KB Output is correct
98 Correct 19 ms 23808 KB Output is correct
99 Correct 21 ms 23808 KB Output is correct
100 Correct 21 ms 23808 KB Output is correct
101 Correct 19 ms 23936 KB Output is correct
102 Correct 19 ms 23808 KB Output is correct
103 Correct 18 ms 23808 KB Output is correct
104 Correct 23 ms 23808 KB Output is correct
105 Correct 18 ms 23808 KB Output is correct
106 Correct 19 ms 23808 KB Output is correct
107 Correct 19 ms 23808 KB Output is correct
108 Correct 24 ms 23936 KB Output is correct
109 Correct 19 ms 23936 KB Output is correct
110 Correct 19 ms 23808 KB Output is correct
111 Correct 19 ms 23808 KB Output is correct
112 Correct 20 ms 23808 KB Output is correct
113 Correct 21 ms 23808 KB Output is correct
114 Correct 19 ms 23808 KB Output is correct
115 Correct 18 ms 23808 KB Output is correct
116 Correct 21 ms 23808 KB Output is correct
117 Correct 20 ms 23808 KB Output is correct
118 Correct 19 ms 23936 KB Output is correct
119 Correct 19 ms 23808 KB Output is correct
120 Correct 20 ms 23808 KB Output is correct
121 Correct 19 ms 23808 KB Output is correct
122 Correct 19 ms 23808 KB Output is correct
123 Correct 19 ms 23808 KB Output is correct
124 Correct 19 ms 23808 KB Output is correct
125 Correct 22 ms 23936 KB Output is correct
126 Correct 19 ms 23808 KB Output is correct
127 Correct 19 ms 23808 KB Output is correct
128 Correct 18 ms 23808 KB Output is correct
129 Correct 21 ms 23936 KB Output is correct
130 Correct 19 ms 23808 KB Output is correct
131 Correct 19 ms 23936 KB Output is correct
132 Correct 19 ms 23936 KB Output is correct
133 Correct 19 ms 23936 KB Output is correct
134 Correct 19 ms 23936 KB Output is correct
135 Correct 19 ms 23936 KB Output is correct
136 Correct 19 ms 23936 KB Output is correct
137 Correct 19 ms 23936 KB Output is correct
138 Correct 19 ms 23936 KB Output is correct
139 Correct 18 ms 23808 KB Output is correct
140 Correct 20 ms 23936 KB Output is correct
141 Correct 19 ms 23936 KB Output is correct
142 Correct 19 ms 24064 KB Output is correct
143 Correct 20 ms 23936 KB Output is correct
144 Correct 19 ms 23808 KB Output is correct
145 Correct 19 ms 23808 KB Output is correct
146 Correct 19 ms 23808 KB Output is correct
147 Correct 19 ms 23808 KB Output is correct
148 Correct 20 ms 23808 KB Output is correct
149 Correct 18 ms 23808 KB Output is correct
150 Correct 20 ms 23808 KB Output is correct
151 Correct 21 ms 23808 KB Output is correct
152 Correct 20 ms 23808 KB Output is correct
153 Correct 19 ms 23808 KB Output is correct
154 Correct 19 ms 23808 KB Output is correct
155 Correct 19 ms 23808 KB Output is correct
156 Correct 19 ms 23808 KB Output is correct
157 Correct 19 ms 23808 KB Output is correct
158 Correct 20 ms 23808 KB Output is correct
159 Correct 21 ms 23808 KB Output is correct
160 Correct 18 ms 23808 KB Output is correct
161 Correct 20 ms 23808 KB Output is correct
162 Correct 18 ms 23808 KB Output is correct
163 Correct 18 ms 23808 KB Output is correct
164 Correct 19 ms 23808 KB Output is correct
165 Correct 19 ms 23808 KB Output is correct
166 Correct 19 ms 23808 KB Output is correct
167 Correct 19 ms 23808 KB Output is correct
168 Correct 19 ms 23808 KB Output is correct
169 Correct 19 ms 23808 KB Output is correct
170 Correct 19 ms 23808 KB Output is correct
171 Correct 53 ms 27128 KB Output is correct
172 Correct 100 ms 30328 KB Output is correct
173 Correct 174 ms 33656 KB Output is correct
174 Correct 228 ms 36856 KB Output is correct
175 Correct 321 ms 40184 KB Output is correct
176 Correct 378 ms 43512 KB Output is correct
177 Correct 508 ms 46968 KB Output is correct
178 Correct 598 ms 49912 KB Output is correct
179 Correct 615 ms 53576 KB Output is correct
180 Correct 19 ms 23808 KB Output is correct
181 Correct 762 ms 56568 KB Output is correct
182 Correct 753 ms 59896 KB Output is correct
183 Correct 860 ms 63224 KB Output is correct
184 Correct 923 ms 66552 KB Output is correct
185 Correct 998 ms 69672 KB Output is correct
186 Correct 1054 ms 73080 KB Output is correct
187 Correct 1111 ms 76052 KB Output is correct
188 Correct 1192 ms 79608 KB Output is correct
189 Correct 1283 ms 82680 KB Output is correct
190 Correct 1489 ms 86008 KB Output is correct
191 Correct 21 ms 23808 KB Output is correct
192 Correct 1474 ms 89204 KB Output is correct
193 Correct 295 ms 101880 KB Output is correct
194 Correct 567 ms 180208 KB Output is correct
195 Correct 19 ms 23808 KB Output is correct
196 Correct 20 ms 23808 KB Output is correct
197 Correct 22 ms 23808 KB Output is correct
198 Correct 20 ms 23808 KB Output is correct