QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#99169#2130. Fiolki 2 [A]LeafSeek0 282ms29300kbC++141.5kb2023-04-21 14:19:472023-04-21 14:19:49

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 1
Accepted
time: 1ms
memory: 5816kb

input:

9 10 2
1 3
1 5
2 5
5 4
5 6
2 6
2 9
2 8
1 5
1 9

output:

1
9
18

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 3ms
memory: 6000kb

input:

2 1 1
1 2

output:

0
1

result:

ok 2 lines

Test #3:

score: 0
Accepted
time: 3ms
memory: 5836kb

input:

10 30 3
8 5
5 7
4 5
4 8
1 7
3 7
4 7
10 6
1 4
2 7
3 7
3 8
2 4
8 7
3 8
10 4
6 5
3 8
4 5
9 7
2 8
8 9
1 8
5 9
3 4
3 10
1 8
1 8
2 6
10 6

output:

0
7
6
15

result:

ok 4 lines

Test #4:

score: 0
Accepted
time: 0ms
memory: 5880kb

input:

11 10 10
4 11
7 11
1 11
2 11
6 11
8 11
7 11
6 11
3 11
6 11

output:

0
1
0
0
0
0
0
0
0
0
0

result:

ok 11 lines

Test #5:

score: 0
Accepted
time: 3ms
memory: 6040kb

input:

100 323 5
83 100
83 98
81 79
47 53
48 59
11 12
48 61
4 7
46 47
16 13
69 71
19 10
91 99
94 89
19 26
91 95
98 96
53 54
54 48
95 96
100 99
72 84
10 17
81 86
20 22
80 79
58 57
15 19
89 97
83 89
79 93
59 60
97 100
86 94
39 45
51 53
95 100
84 85
63 79
83 88
25 47
44 39
79 92
12 18
15 17
4 14
4 11
88 90
29...

output:

0
101
106
128
155
4070

result:

ok 6 lines

Test #6:

score: 0
Accepted
time: 3ms
memory: 5856kb

input:

100 498 10
11 41
7 18
21 37
11 86
13 83
6 13
14 55
12 21
21 83
11 68
13 26
18 57
13 84
14 20
19 38
16 73
11 43
7 14
8 80
20 50
11 75
13 21
10 13
9 14
4 12
14 15
21 95
11 69
11 72
14 11
21 81
18 95
21 62
21 30
19 27
16 51
20 98
18 29
13 36
8 94
18 79
11 77
14 26
21 28
8 56
18 35
20 91
11 18
4 11
20 4...

output:

0
90
89
88
87
86
85
84
83
103
3300

result:

ok 11 lines

Test #7:

score: 0
Accepted
time: 1ms
memory: 5856kb

input:

100 500 10
6 38
41 43
13 56
8 26
64 66
16 48
56 75
56 70
32 37
56 76
60 86
24 65
13 59
73 68
86 97
5 17
38 40
2 20
17 21
49 98
21 58
10 23
21 59
40 43
42 85
98 87
56 79
87 95
56 80
56 78
10 24
23 18
6 32
25 45
40 48
36 49
56 77
44 93
56 96
16 64
24 66
41 43
8 25
5 21
60 86
56 86
6 16
44 94
85 83
8 2...

output:

0
99
241
631
375
623
1396
730
0
0
0

result:

ok 11 lines

Test #8:

score: 0
Accepted
time: 1ms
memory: 5900kb

input:

98 500 10
31 16
76 79
70 80
47 24
54 32
32 33
30 31
57 47
47 34
70 46
93 66
42 14
57 62
19 22
94 58
47 23
77 82
71 72
5 34
93 66
57 60
86 94
47 30
35 25
94 87
49 50
23 21
35 25
60 49
53 76
97 95
31 16
93 66
88 89
2 98
1 57
1 90
24 26
67 65
98 85
55 54
83 64
30 28
94 91
47 24
59 48
77 82
60 61
98 43
...

output:

0
179
321
417
378
425
829
987
380
0
0

result:

ok 11 lines

Test #9:

score: 0
Accepted
time: 0ms
memory: 5860kb

input:

98 498 10
54 15
58 63
60 14
78 83
86 81
71 88
54 67
58 68
93 92
90 91
98 90
81 94
55 96
91 84
29 23
72 76
18 22
80 59
3 89
12 11
60 74
34 27
74 64
47 88
45 57
4 49
8 48
69 77
47 54
17 23
61 82
1 18
65 67
45 20
93 87
10 20
69 68
45 89
8 45
58 80
3 69
54 51
60 74
95 90
53 98
47 71
81 94
44 29
93 92
4 ...

output:

0
101
108
142
169
330
384
824
1858
0
0

result:

ok 11 lines

Test #10:

score: 0
Accepted
time: 4ms
memory: 5856kb

input:

98 499 9
73 87
59 95
50 91
32 31
43 36
73 70
42 30
34 11
39 95
51 20
59 60
3 47
66 56
95 94
7 60
52 58
32 40
14 72
43 40
63 62
42 26
4 42
63 50
36 29
4 67
7 65
71 11
58 48
57 54
90 87
71 75
63 53
61 62
7 59
31 30
76 94
51 39
42 39
36 37
30 20
14 74
66 54
31 27
44 48
33 74
12 19
63 57
67 63
25 78
31 ...

output:

0
89
88
87
86
96
284
3275
0
0

result:

ok 10 lines

Test #11:

score: 0
Accepted
time: 3ms
memory: 5796kb

input:

99 498 9
18 30
76 95
43 50
11 55
9 26
5 16
13 30
19 64
69 83
67 60
82 98
27 35
18 31
2 49
40 95
54 61
19 73
74 86
29 28
22 18
64 65
71 73
72 80
18 31
17 12
3 47
49 48
35 25
1 52
81 86
85 99
45 50
45 63
4 24
54 78
84 94
22 18
2 34
42 39
9 36
37 12
25 13
65 81
4 37
84 94
16 18
9 39
9 37
39 70
43 33
47...

output:

0
90
89
88
87
92
222
541
656
2230

result:

ok 10 lines

Test #12:

score: 0
Accepted
time: 1ms
memory: 5876kb

input:

100 498 10
42 48
56 51
5 74
6 48
8 77
55 56
65 64
68 11
92 95
74 80
65 64
29 46
42 46
89 87
88 85
32 59
92 97
38 29
7 49
32 40
55 56
30 20
74 80
13 30
30 20
62 70
30 20
15 44
77 71
75 82
29 46
72 86
13 42
94 93
64 37
81 12
64 12
23 42
65 63
77 84
89 100
89 92
99 67
94 93
13 45
2 70
30 21
74 75
72 86...

output:

0
108
140
186
168
197
439
361
966
1530
0

result:

ok 11 lines

Test #13:

score: 0
Accepted
time: 3ms
memory: 5848kb

input:

99 500 9
85 86
28 86
18 97
27 30
92 87
21 23
3 37
16 50
10 34
63 72
27 46
8 11
92 99
42 60
8 77
11 18
2 26
56 58
52 49
42 56
70 86
29 16
22 24
63 81
33 21
80 75
56 68
5 22
90 97
13 10
85 77
56 99
26 90
49 43
2 35
4 73
42 54
13 34
84 76
51 52
53 57
22 31
56 57
33 39
44 47
23 29
11 20
1 86
61 60
90 94...

output:

0
90
89
88
142
96
169
310
1304
1807

result:

ok 10 lines

Test #14:

score: 0
Accepted
time: 3ms
memory: 5872kb

input:

100 498 9
54 23
76 82
60 35
27 66
53 54
66 82
19 17
44 29
85 82
54 24
64 78
35 27
89 90
93 97
98 52
67 73
16 21
45 43
87 92
81 83
53 55
69 76
44 60
76 71
60 63
59 78
1 87
55 61
54 20
5 86
3 52
98 47
98 42
52 60
79 57
79 74
88 36
29 26
48 30
66 85
67 79
3 96
76 65
67 84
54 17
44 35
25 34
49 68
98 60
...

output:

0
91
90
89
89
91
545
1349
1842
0

result:

ok 10 lines

Test #15:

score: 0
Accepted
time: 1ms
memory: 6048kb

input:

100 500 9
55 43
31 85
45 76
69 83
39 14
3 100
3 100
33 35
39 11
98 62
27 16
9 32
50 87
75 70
53 82
35 36
50 89
4 92
75 70
94 95
5 98
99 95
93 92
64 67
2 94
37 21
3 56
67 55
40 39
4 92
50 90
86 87
84 16
64 67
28 22
20 22
53 82
52 53
60 51
38 41
14 26
60 89
31 85
6 94
34 27
3 61
31 29
44 49
13 19
3 61...

output:

0
485
1199
873
835
96
113
585
0
0

result:

ok 10 lines

Test #16:

score: 0
Accepted
time: 1ms
memory: 5864kb

input:

98 500 10
46 33
83 70
26 29
72 71
3 46
45 32
68 35
42 43
5 98
24 21
94 80
94 76
84 74
10 95
68 40
72 63
6 98
72 64
68 30
8 97
17 56
22 13
86 33
94 80
84 74
87 82
45 34
97 85
1 95
79 76
34 51
53 51
95 79
86 57
26 46
3 48
68 42
32 35
90 91
87 85
8 96
26 31
42 31
90 93
15 13
83 40
80 75
22 15
79 75
61 ...

output:

0
88
87
86
85
84
86
219
438
2743
0

result:

ok 11 lines

Test #17:

score: 0
Accepted
time: 1ms
memory: 5876kb

input:

98 499 10
1 38
1 33
16 47
45 50
5 83
83 78
67 92
4 51
33 40
2 71
1 19
86 76
4 42
9 43
83 73
44 56
32 84
29 86
17 14
3 41
43 92
59 66
11 15
82 79
19 35
1 27
1 19
42 54
1 12
60 53
10 47
45 47
8 35
10 42
38 63
1 33
45 48
30 88
16 57
17 11
9 83
40 93
18 25
19 29
35 36
65 66
1 38
19 28
1 12
29 89
83 74
4...

output:

0
91
110
125
122
240
286
316
360
866
1400

result:

ok 11 lines

Test #18:

score: 0
Accepted
time: 1ms
memory: 6028kb

input:

98 498 10
40 37
68 22
97 86
21 84
20 33
12 15
47 43
4 84
51 98
7 78
19 37
45 49
62 61
60 47
63 55
8 18
76 80
5 13
74 47
65 79
63 56
91 93
73 66
83 92
4 81
28 32
52 51
57 58
5 18
74 63
95 85
72 78
26 30
45 46
21 34
4 73
74 83
29 23
3 17
61 53
12 57
97 95
76 36
40 30
37 36
57 79
76 54
9 12
73 11
75 17...

output:

0
88
87
86
88
103
155
169
280
533
2327

result:

ok 11 lines

Test #19:

score: 0
Accepted
time: 3ms
memory: 5864kb

input:

100 500 9
28 38
23 100
74 71
19 57
93 59
81 94
56 61
7 17
17 46
8 40
8 54
71 59
17 23
32 49
86 93
61 65
45 27
3 72
19 92
17 49
13 50
79 80
51 95
25 27
23 42
19 63
23 39
19 67
100 84
20 16
99 54
8 46
13 46
7 20
48 78
99 64
70 65
28 37
8 60
20 41
78 90
12 33
99 58
3 72
79 66
1 25
13 47
16 91
32 49
16 ...

output:

0
95
107
150
196
250
569
189
337
2293

result:

ok 10 lines

Test #20:

score: -1
Wrong Answer
time: 4ms
memory: 5872kb

input:

100 500 10
11 12
11 13
11 16
11 20
11 28
11 45
12 15
12 17
12 21
12 29
12 46
13 15
13 18
13 22
13 30
13 47
15 19
15 23
15 31
15 48
16 17
16 18
16 24
16 32
16 49
17 19
17 25
17 33
17 50
18 19
18 26
18 34
18 51
19 27
19 35
19 52
20 21
20 22
20 24
20 36
20 53
21 23
21 25
21 37
21 55
22 23
22 26
22 38
2...

output:

367
448
514
541
299
407
249
184
141
103
842

result:

wrong answer 1st lines differ - expected: '6', found: '367'

Subtask #2:

score: 0
Wrong Answer

Test #21:

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

input:

300 1500 15
135 85
20 257
1 68
264 273
33 299
212 67
280 233
155 75
103 26
59 206
29 217
163 84
100 290
172 222
5 220
283 216
242 234
250 89
194 176
141 214
68 64
177 91
142 214
220 90
8 156
186 275
286 209
272 107
69 38
169 31
164 203
125 190
270 37
97 188
51 158
132 211
39 279
62 290
2 246
220 122...

output:

71
364
377
378
402
417
417
484
496
519
662
831
1454
3541
7263
23079

result:

wrong answer 1st lines differ - expected: '21', found: '71'

Subtask #3:

score: 0
Wrong Answer

Test #40:

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

input:

5000 15000 50
1181 1258
4643 84
55 2696
1551 4754
288 991
2926 858
4303 1448
4880 1475
1042 349
3042 628
1375 2853
1365 997
47 4335
2585 1715
4225 1987
867 1285
2144 1193
325 4578
3600 1356
3528 1711
4851 858
3205 2373
3500 801
2499 922
4780 506
587 3251
1730 664
127 2551
4346 656
3538 2694
1065 503...

output:

33678
40833
43044
44039
42441
44278
47027
46321
45966
52204
51040
54698
57448
61795
63831
66911
64350
73409
70350
73872
84715
78437
85051
94179
89212
109763
122850
122090
133597
142897
138534
125337
157790
182435
206877
224122
207420
256120
228510
277704
258712
346113
607128
468015
523696
394173
561...

result:

wrong answer 1st lines differ - expected: '5460', found: '33678'

Subtask #4:

score: 0
Wrong Answer

Test #60:

score: 0
Wrong Answer
time: 240ms
memory: 25104kb

input:

50000 1000000 15
18880 16174
41509 31679
15076 47370
20331 45525
9011 10292
30074 3605
28537 9840
40932 12040
9966 39950
35297 36791
39932 38466
41304 6021
48553 3399
29042 25334
24827 41347
29537 37302
1233 15027
13100 2493
36854 26961
45936 13745
16541 43321
22862 34077
39416 3809
26911 8586
43697...

output:

1385847
1603408
1777522
2039025
2373631
2608948
3045452
3368900
4534000
5262084
7539970
9715430
14824189
18246444
47664378
1123285877

result:

wrong answer 1st lines differ - expected: '5726', found: '1385847'

Subtask #5:

score: 0
Wrong Answer

Test #81:

score: 0
Wrong Answer
time: 120ms
memory: 15648kb

input:

49999 500000 14
8451 9663
47608 35604
43707 49176
30218 12199
33000 6332
21117 37700
22586 49448
48986 4776
44551 21414
35 15791
36760 20522
39131 26292
26361 14373
25816 24129
43807 40898
9232 4733
37022 49437
48377 34456
21357 47546
19303 6932
19479 11761
45024 39091
11275 36126
30296 5456
35217 1...

output:

3543600
3789926
5228029
5707192
6601058
8239346
10472773
12124034
19147824
22679592
25151492
30327795
74778129
213895804
807588511

result:

wrong answer 1st lines differ - expected: '18779', found: '3543600'

Subtask #6:

score: 0
Wrong Answer

Test #102:

score: 0
Wrong Answer
time: 259ms
memory: 25396kb

input:

70000 1000000 30
27533 9943
48960 13744
52910 60232
44875 56836
37462 15774
67781 1878
32722 69261
37166 3079
27820 54868
24963 69502
55515 34942
55875 877
33007 52281
21879 49685
69183 32992
36260 50465
38748 6864
16727 3198
27918 4429
15312 5967
69884 32618
37330 753
16587 24875
2474 7451
56404 30...

output:

2747200
2970452
3158096
3412147
3412415
3890141
3850972
4136381
4544141
4782113
5089658
5621822
5709709
6529991
7152347
7174171
8397291
8734253
10081910
12424471
13481096
15850787
17573816
19068412
22580655
29041931
41443952
69414314
83278045
148781871
1873600875

result:

wrong answer 1st lines differ - expected: '14187', found: '2747200'

Subtask #7:

score: 0
Wrong Answer

Test #128:

score: 0
Wrong Answer
time: 131ms
memory: 17456kb

input:

69999 500000 29
60938 42787
36148 15312
17077 62566
36724 15655
25348 24373
9403 47728
18478 29610
64349 17652
40061 61284
28202 31379
33229 65668
55838 49941
20749 7682
29174 22329
4738 51379
61834 65526
51830 26697
42178 39473
15702 64077
66057 18316
50196 6614
64655 50197
60126 49955
21698 64722
...

output:

4003707
4321607
4672996
5141759
5615247
5900587
5910532
6352534
7524650
7455017
8070299
8245847
8787627
10647286
11076721
12295864
14001555
14704144
17595061
21251012
25715870
27870205
30685753
43224078
52162707
58576109
95807188
87313042
212461072
1630545359

result:

wrong answer 1st lines differ - expected: '38719', found: '4003707'

Subtask #8:

score: 0
Wrong Answer

Test #154:

score: 0
Wrong Answer
time: 282ms
memory: 29300kb

input:

100000 1000000 50
92999 77320
11746 6374
11113 48883
3765 30529
48050 41374
43964 55281
72039 28956
73896 23173
60646 84514
83912 9312
88361 68809
49972 16619
20949 36967
41288 55033
30115 57398
84781 21275
91108 64332
81204 87998
15398 70615
1116 27156
97295 12872
89612 49202
62495 32370
70840 4614...

output:

3637844
3867263
3836916
4177661
4165087
4289619
4494492
4609532
4818135
5059361
4972176
5092245
5667001
5909900
6194266
6278493
6175778
6798150
7186222
7438630
7850683
7847882
8482775
8534385
9287938
10171739
10590227
11052088
11628464
12671329
13373364
14338662
16176317
16084029
18326245
19952892
2...

result:

wrong answer 1st lines differ - expected: '29512', found: '3637844'

Subtask #9:

score: 0
Wrong Answer

Test #180:

score: 0
Wrong Answer
time: 143ms
memory: 17716kb

input:

99999 500000 49
8861 92315
18860 68957
24970 68840
31601 51945
44688 39847
79070 34993
12170 13894
75544 87259
6748 38760
98547 18652
9011 49641
40213 75883
89168 28210
62099 34092
25016 29026
10670 85648
55350 68113
3188 30844
2115 14445
765 9058
71650 23644
77821 96625
56700 12489
15671 31370
5736...

output:

8781887
9611771
9684654
10178912
10690654
10934080
11655222
12002076
11445355
11576774
12027995
12318561
12891438
14438897
14854411
14326448
16808859
16299409
17100085
18010220
17506976
17796643
19968659
21421732
21153610
23404959
25429828
25246274
27457087
25013961
27243096
29761458
32468143
350328...

result:

wrong answer 1st lines differ - expected: '117262', found: '8781887'

Subtask #10:

score: 0
Wrong Answer

Test #206:

score: 0
Wrong Answer
time: 114ms
memory: 14620kb

input:

99998 333333 48
73739 93660
91007 91516
66213 58419
14322 20532
23379 45804
68919 29793
96370 75509
32761 33718
67640 41557
44076 22311
98483 81319
19053 94794
53747 71410
37756 45486
80813 7949
77662 37115
50333 69157
83060 39070
40304 52327
88393 62810
45164 62483
34608 2510
86417 91245
42491 9720...

output:

12543988
13782269
13765348
12609266
14366246
14925435
15293641
16865654
17108333
20269801
20577810
19422598
21160706
22225680
24198233
23596397
22662740
27239154
25238939
29343014
25549026
29092446
31242793
34472413
35709701
38641563
42067588
43712227
44535182
48034007
46155112
53615196
50636909
625...

result:

wrong answer 1st lines differ - expected: '392726', found: '12543988'