QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#78282#4891. 树上的孤独znstz0 1851ms488140kbC++146.9kb2023-02-17 16:22:092023-02-17 16:22:11

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 4ms
memory: 136696kb

input:

20 2000 2000
8 15
8 13
14 8
14 7
12 14
12 1
9 13
9 4
5 9
5 10
2 5
2 19
6 19
6 16
11 7
11 20
18 2
18 17
3 6
1395 1783
1395 1735
1735 457
457 739
739 438
438 101
101 441
441 1879
1879 1238
1238 501
501 1732
1732 1910
1910 2000
2000 834
834 917
917 111
111 780
780 1966
1966 1604
1604 623
623 1748
1748 ...

output:

103
84
1
40
1
37
189
9
69
20
15
200
78
76
137
25
54
8
70
25
10
6
13
59
54
100
26
200
25
118
84
20
78
25
200
95
16
48
11
19
57
45
24
2
108
157
15
4
15
94
40
99
16
66
172
81
31
141
163
8
136
15
97
132
120
56
23
52
1
12
41
33
48
13
33
153
101
127
140
200
12
76
55
114
72
9
16
22
173
37
61
48
96
4
53
59
...

result:

wrong answer 1st numbers differ - expected: '105', found: '103'

Subtask #2:

score: 0
Wrong Answer

Test #3:

score: 0
Wrong Answer
time: 1851ms
memory: 488140kb

input:

20 200000 500000
8 18
8 4
2 4
2 14
13 4
13 16
6 4
6 3
1 4
1 17
15 6
15 19
7 17
7 11
5 14
5 10
20 7
12 15
9 8
165302 77239
165302 198189
165302 180850
165302 192738
165302 173589
165302 194087
165302 191990
165302 167370
165302 101092
165302 92553
165302 163654
165302 122381
165302 152105
165302 1919...

output:

1
17595
3896
3419
11
517
5136
11355
1
7339
1
18327
15797
6628
514
1179
6110
1869
6227
661
16736
13223
1596
5445
6059
2385
6265
1
1
277
3497
1806
1235
1036
17801
4656
5519
4632
4545
1
243
2684
1
4609
8560
4031
1
13497
5636
2053
3487
4879
5828
783
2069
1493
13231
2575
921
16805
1
17623
334
1
1
719
2
2...

result:

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

Subtask #3:

score: 0
Wrong Answer

Test #7:

score: 0
Wrong Answer
time: 468ms
memory: 267796kb

input:

20 100000 100000
16 12
16 20
6 12
6 18
2 16
2 8
5 20
5 13
3 6
3 11
19 11
19 17
9 12
9 15
4 15
4 7
10 5
14 15
14 1
85812 94626
85812 91172
91172 93788
93788 96567
96567 75524
75524 23275
23275 98340
98340 81608
81608 91480
91480 75108
75108 56605
56605 93317
93317 41617
41617 77160
77160 727
727 7559...

output:

2565
612
8337
8983
3552
9180
641
281
2464
7307
2674
1174
1383
1253
8244
4407
109
2679
624
4863
3153
9182
1
8987
2091
9950
8009
9944
1
5037
76
2021
1881
1
1275
2179
336
1092
9386
3462
7723
1957
2741
1245
2319
708
2
544
2
429
699
2332
447
4
1
1422
2308
679
2447
2
2318
697
9999
1
177
1366
8932
6497
766...

result:

wrong answer 1st numbers differ - expected: '2568', found: '2565'

Subtask #4:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 1457ms
memory: 392352kb

input:

1 200000 500000
189127 137023
189127 199761
199761 160701
160701 130639
130639 190908
190908 176819
176819 193363
193363 188021
188021 182446
182446 186028
186028 198828
198828 190792
190792 155378
155378 189428
189428 177276
177276 146159
146159 175923
175923 188073
188073 182206
182206 131072
1310...

output:

3781
1773
770
7328
18160
19394
1951
1
5498
1
2861
3368
7392
5130
5706
1
5996
19866
1
5123
1
12549
1496
4837
7770
16333
18175
5925
17983
19707
3820
17709
17093
4225
3824
575
5637
3659
4971
15672
1
18776
29
5067
16605
2275
16601
4544
597
841
19976
7054
881
163
2743
1683
6747
5090
1631
5109
2930
2777
1...

result:

wrong answer 1st numbers differ - expected: '3782', found: '3781'

Subtask #5:

score: 0
Time Limit Exceeded

Test #15:

score: 0
Time Limit Exceeded

input:

20 200000 1000000
13 10
13 5
19 5
19 20
15 10
15 6
12 6
12 3
8 10
8 2
1 20
1 11
14 10
14 16
18 3
18 7
4 3
9 10
9 17
194055 154514
194055 148156
148156 115271
115271 198116
198116 179433
179433 171975
171975 196600
196600 167194
167194 185078
185078 191409
191409 163496
163496 178243
178243 154093
15...

output:

459
5806
10111
7654
4886
19469
3566
16015
2833
7536
1125
9916
18519
479
11860
2076
9842
7575
7283
92
1835
7382
3346
6091
19485
16481
6206
1725
5912
5591
3804
1914
699
3303
2700
19890
5605
628
751
1299
15991
2973
1655
14622
5208
2706
99
1896
3262
1880
14747
4575
7219
5890
11018
4391
7459
9748
19632
5...

result: