QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#186186#5418. Color the Treecbant15WA 22ms14152kbC++142.8kb2023-09-23 11:51:232023-09-23 11:51:24

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 12796kb

input:

3
4
10 15 40 1
1 2
2 3
2 4
5
10 5 1 100 1000
1 2
2 3
2 4
4 5
4
1000 200 10 8
1 2
2 3
3 4

output:

35
17
1218

result:

ok 3 number(s): "35 17 1218"

Test #2:

score: -100
Wrong Answer
time: 22ms
memory: 14152kb

input:

3000
54
43 44 11 49 17 14 7 30 35 12 34 14 15 8 29 47 30 31 39 17 26 23 26 45 34 50 49 13 35 18 29 15 13 44 47 5 22 20 19 46 30 22 26 13 47 46 43 27 48 48 13 14 30 44
1 2
1 3
2 4
3 5
4 6
2 7
4 8
1 9
3 10
1 11
8 12
2 13
9 14
1 15
1 16
15 17
15 18
7 19
1 20
19 21
13 22
10 23
17 24
9 25
9 26
24 27
8 28...

output:

180
168
222
230
156
240
225
133
100
81
155
73
166
127
149
139
228
230
140
191
153
171
88
282
225
283
204
211
119
206
211
252
88
257
239
244
173
187
195
196
109
243
180
200
284
210
182
109
226
59
56
31
115
224
203
172
155
217
53
150
189
203
173
137
233
110
163
273
80
350
161
133
189
159
240
281
152
2...

result:

wrong answer 8th numbers differ - expected: '126', found: '133'