QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#376092#5418. Color the Treeucup-team3188#WA 124ms3796kbC++203.1kb2024-04-03 20:41:542024-04-03 20:41:56

详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3512kb

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: 124ms
memory: 3796kb

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:

218
192
222
230
187
329
262
128
100
99
195
89
211
134
149
161
228
302
224
232
172
170
93
370
320
357
238
293
119
285
363
323
114
318
290
303
300
226
282
171
135
163
197
224
503
290
275
97
226
59
56
31
159
294
265
202
147
253
53
146
371
248
216
150
346
99
218
428
80
538
216
182
232
185
325
338
144
31...

result:

wrong answer 1st numbers differ - expected: '180', found: '218'