QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#61354#4839. Smaller LCATTW#TL 3ms40944kbC++173.9kb2022-11-12 15:00:552022-11-12 15:00:58

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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:

44999437117
44999604051
44999615557
44999614574
44999052534
44999484860
44999371316
44999125588
44999026878
44999118903
44999600090
44999126307
44999249359
44999307961
44999422135
44999360213
44999109672
44999283107
44999293969
44999113471
44999549862
44999278828
44999353626
44999122409
44999352565
...

result: