QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#606107#5148. Tree DistanceCyber_PunkWA 1086ms125000kbC++143.3kb2024-10-02 22:10:572024-10-02 22:10:58

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 7ms
memory: 44784kb

input:

5
1 2 5
1 3 3
1 4 4
3 5 2
5
1 1
1 4
2 4
3 4
2 5

output:

-1
3
7
7
2

result:

ok 5 number(s): "-1 3 7 7 2"

Test #2:

score: -100
Wrong Answer
time: 1086ms
memory: 125000kb

input:

199999
31581 23211 322548833
176307 196803 690953895
34430 82902 340232856
36716 77480 466375266
7512 88480 197594480
95680 61864 679567992
19572 14126 599247796
188006 110716 817477802
160165 184035 722372640
23173 188594 490365246
54801 56250 304741654
10103 45884 643490340
127469 154479 214399361...

output:

29573323
1178569098929
4088
65959
4366
7019193245
760172089
4867978
328055210
55721881562
2062364707
339719
92126
92126
4366
138216269
8212187
9404444928
2681285
4366
710854
114886
65959
1818252547
92126
91087
8367049186
26776689
5718199
710854
92126
1162886184
365255209
92126
710854
92126
710854
43...

result:

wrong answer Answer contains longer sequence [length = 999999], but output contains 199999 elements