QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#97618#4891. 树上的孤独slime0 924ms159768kbC++145.3kb2023-04-17 15:55:542023-04-17 15:55:57

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 14924kb

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:

9
39
2
8
14
21
86
16
52
27
18
52
31
25
77
18
22
28
20
21
12
2
16
22
12
8
4
33
18
17
25
3
16
36
86
18
2
13
10
2
19
18
7
2
13
20
13
8
15
25
22
17
12
25
37
30
32
21
85
2
12
7
9
19
74
7
4
5
10
14
19
10
23
4
15
77
11
20
13
108
8
33
24
63
29
5
15
6
22
20
12
16
67
5
9
27
1
8
10
3
22
12
9
5
4
14
5
25
5
16
1...

result:

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

Subtask #2:

score: 0
Wrong Answer

Test #3:

score: 0
Wrong Answer
time: 573ms
memory: 112644kb

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:

0
658
307
357
5
44
382
1701
1
827
1
3059
2787
501
315
108
463
825
469
224
570
345
152
1695
82
193
1259
1
1
17
678
354
273
1038
685
1364
1719
4633
337
1
94
557
0
427
1826
1029
1
365
1746
434
1299
5138
1029
802
1220
2594
345
279
679
3207
0
659
19
0
1
414
0
769
438
5105
2153
1
388
366
1132
2615
629
0
6...

result:

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

Subtask #3:

score: 0
Wrong Answer

Test #7:

score: 0
Wrong Answer
time: 110ms
memory: 49108kb

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:

387
583
5268
872
96
829
265
97
387
1020
541
473
221
360
2637
1315
106
351
169
1159
1061
828
10
3259
268
3935
2388
1096
10
1222
40
248
635
15
214
333
53
318
1488
543
445
1558
1551
397
667
404
12
143
8
101
185
2210
69
5
3
489
662
149
1226
10
652
112
1123
7
63
1302
872
1084
1109
177
5838
3
74
37
1066
2...

result:

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

Subtask #4:

score: 0
Wrong Answer

Test #13:

score: 0
Wrong Answer
time: 425ms
memory: 109656kb

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:

463
1773
318
1386
1796
2549
397
1
1028
0
367
395
1984
604
1232
0
4809
8173
0
957
0
854
303
4837
3068
1329
1636
859
1748
2690
465
1472
1179
846
230
161
1227
681
7
1727
1
6667
20
1191
1691
283
1230
1001
108
48
3215
2779
227
25
341
1683
2967
603
326
605
487
467
18
1473
921
6412
1771
688
259
536
3413
13...

result:

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

Subtask #5:

score: 0
Wrong Answer

Test #15:

score: 0
Wrong Answer
time: 924ms
memory: 159768kb

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:

249
1488
1822
1108
1016
5086
903
7764
546
661
847
2245
989
88
534
636
1768
1098
547
22
137
1352
839
2868
1061
983
600
452
520
1044
646
275
46
484
429
1067
5464
184
48
124
1273
2551
277
1248
1324
841
32
1614
2411
120
5418
486
5308
320
1720
249
660
2051
5955
535
153
2352
454
942
150
1876
425
4432
435
...

result:

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