QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#174351#4839. Smaller LCAbjaoefiajTL 3ms16168kbC++143.3kb2023-09-10 06:45:492023-09-10 06:45:50

详细

Test #1:

score: 100
Accepted
time: 3ms
memory: 16168kb

input:

5
1 2
4 2
2 5
3 5

output:

15
15
15
15
14

result:

ok 5 number(s): "15 15 15 15 14"

Test #2:

score: -100
Time Limit Exceeded

input:

300000
40632 143306
32259 40632
225153 143306
269774 225153
289668 40632
191636 269774
85717 191636
58564 191636
156509 143306
289939 40632
247103 269774
40257 40632
98149 289668
142277 143306
291616 40257
46813 225153
56324 143306
277154 142277
53903 289668
114266 32259
152231 58564
241151 152231
4...

output:


result: