QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#592162#7490. 我回来了pku2024-b0737.5 36ms21624kbC++202.7kb2024-09-26 21:00:102024-09-26 21:00:12

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 4.16667
Accepted
time: 0ms
memory: 9904kb

input:

1000 1000
2 270 992
2 70 531
2 121 832
1 906
1 441
2 133 318
2 679 946
1 419
2 251 979
1 570
1 216
1 159
2 707 909
1 674
2 87 110
1 974
2 96 138
2 561 991
2 425 499
2 752 988
1 190
1 220
1 875
1 802
2 213 955
2 288 547
2 15 205
2 653 961
1 26
1 632
1 840
1 116
1 267
1 189
2 443 707
1 400
1 539
1 441...

output:

723
462
712
186
763
1787
605
24
43
1275
287
696
2646
1016
466
927
839
306
2119
1045
3480
537
1185
1304
135
607
2074
1311
2365
1621
1357
3473
1880
998
711
576
1187
1811
453
2586
837
2252
798
172
1573
1378
3409
3039
1902
3449
1057
2888
1437
1091
2686
3019
1750
2488
1503
1616
1464
1329
96
2311
2216
245...

result:

ok 500 numbers

Test #2:

score: 4.16667
Accepted
time: 1ms
memory: 7864kb

input:

1000 1000
1 999
1 490
2 616 782
1 87
1 610
1 951
2 41 166
2 608 761
1 482
2 240 281
1 920
2 167 399
2 391 444
2 36 366
2 198 472
1 260
1 235
1 335
1 918
1 466
1 821
1 468
2 157 762
1 893
1 670
1 367
2 479 897
1 183
2 145 579
2 68 891
1 78
1 448
1 524
1 973
1 210
1 857
2 16 768
2 447 703
1 764
1 694
...

output:

501
206
462
216
881
216
960
1111
2455
1278
2030
3456
3243
824
3135
2347
432
3141
690
1214
1209
1167
3016
531
663
1722
1575
1188
1278
933
928
1678
3151
4009
148
117
1497
1652
2111
2399
2245
957
519
1709
112
962
3351
1194
419
3207
216
984
357
2132
957
1627
1151
3809
2325
4277
1715
1055
1026
498
1527
3...

result:

ok 485 numbers

Test #3:

score: 4.16667
Accepted
time: 0ms
memory: 9876kb

input:

1000 1000
1 476
1 144
2 119 397
2 164 854
2 566 832
1 207
1 749
2 100 828
2 475 517
1 946
1 919
1 378
1 394
1 29
1 788
2 366 980
2 302 573
2 827 908
2 207 926
1 725
2 39 956
2 144 709
1 77
2 675 728
1 243
2 116 540
1 993
1 809
2 75 169
2 802 923
1 897
2 71 141
1 855
2 206 723
2 34 255
1 854
1 134
2 ...

output:

693
1620
534
2180
129
1917
1001
246
2541
3371
2272
162
1900
521
366
370
2001
1188
3205
69
847
2282
620
293
2445
2539
1673
543
3385
886
1037
360
3152
606
2547
456
456
552
303
2752
1884
1348
44
593
1945
798
685
438
793
93
1477
3073
2257
4145
45
903
2096
704
2478
1003
189
1966
350
1475
2703
3348
856
43...

result:

ok 506 numbers

Test #4:

score: 4.16667
Accepted
time: 2ms
memory: 9872kb

input:

1000 1000
2 721 833
1 51
2 471 688
1 487
2 698 712
2 247 766
2 9 592
1 439
1 25
1 987
2 309 949
2 397 399
2 54 511
1 370
2 256 678
1 814
2 126 480
1 701
2 906 980
2 258 677
2 362 424
1 261
1 785
1 109
2 335 819
1 324
2 40 734
2 81 448
1 768
2 896 907
1 405
2 154 500
1 555
1 174
1 889
2 236 591
2 186...

output:

113
436
30
1280
1369
2074
12
1383
1420
1411
225
1567
252
1614
2854
1821
36
1663
1430
2240
1586
2595
2169
246
4249
843
1107
2788
797
438
3318
236
1544
969
1044
642
2142
39
400
1472
795
183
2009
822
276
3393
3209
759
840
4405
2467
2795
542
2126
502
936
1901
403
4068
4660
63
2621
72
348
1363
1020
884
3...

result:

ok 479 numbers

Test #5:

score: 0
Runtime Error

input:

100000 1000000
1 8826
1 47779
1 90554
2 42431 42431
2 9379 9379
1 73998
2 18345 18345
1 98104
1 87189
2 9736 9736
1 43752
2 22124 22124
2 23606 23606
1 87492
1 52852
2 73712 73712
2 1019 1019
2 17896 17896
1 1564
2 8503 8503
1 81743
2 15897 15897
2 37020 37020
2 45814 45814
1 3107
2 7782 7782
2 3414...

output:


result:


Test #6:

score: 0
Runtime Error

input:

100000 1000000
2 27188 27188
1 71975
2 37092 37092
1 88379
1 61656
2 39270 39270
2 29252 29252
2 30997 30997
2 23788 23788
2 14573 14573
2 13520 13520
2 62798 62798
2 10952 10952
2 36389 36389
2 22393 22393
2 7028 7028
2 25244 25244
2 17472 17472
1 94430
2 1170 1170
2 31221 31221
2 857 857
1 85851
2...

output:


result:


Test #7:

score: 0
Runtime Error

input:

100000 1000000
2 45549 45549
1 70613
2 42644 42644
2 66369 66369
2 23123 23123
2 18601 18601
2 16403 16403
2 73327 73327
2 25017 25017
2 58174 58174
1 9527
2 3799 3799
1 2658
1 68336
2 42560 42560
2 51701 51701
2 32292 32292
2 55224 55224
2 44301 44301
1 48835
2 67429 67429
2 71281 71281
2 11151 111...

output:


result:


Test #8:

score: 0
Runtime Error

input:

100000 1000000
1 67109
1 66563
1 69271
1 76150
2 29832 29832
1 56049
1 2319
1 39723
1 64002
2 13862 13862
1 79205
1 3328
2 13099 13099
2 38083 38083
1 59237
2 14180 14180
2 74994 74994
1 18115
1 46274
1 59983
1 28288
1 43476
1 94391
1 23902
1 81096
1 5435
1 39572
1 71346
1 82732
1 6945
2 77602 77602...

output:


result:


Test #9:

score: 4.16667
Accepted
time: 36ms
memory: 21624kb

input:

100000 1000000
1 40343
1 31193
1 96487
1 51217
1 73281
1 63210
1 61015
1 2452
1 51337
1 24975
1 68761
1 98956
1 51257
1 901
1 54590
1 92357
1 60331
1 26736
1 10387
1 5847
1 42883
1 57499
1 97543
1 96521
1 60291
1 52697
1 95385
1 70924
1 63561
1 42117
1 50300
1 21210
1 49086
1 86438
1 64650
1 33693
1...

output:

39280
33564
147625
358503
219023
282693
3639
16520
41325
102909
43962
168910
222280
49939
365952
96981
159235
110861
188932
266365
171554
142575
46314
41028
99647
336988
41373
113916
17961
132000
129807
292707
32823
233117
319578
192306
325430
72638
10569
259402
48334
13356
76288
77694
129165
21470
...

result:

ok 100001 numbers

Test #10:

score: 0
Runtime Error

input:

100000 1000000
1 42756
1 13171
1 82775
1 71817
1 38855
1 52191
1 54364
1 39773
1 9355
1 46135
1 20446
1 85603
1 8386
1 46805
1 28685
1 39101
1 67896
1 64806
1 30868
1 78764
1 16298
1 20258
1 66817
1 18930
1 91730
1 54151
1 92319
1 43285
1 88124
1 33966
1 39746
1 50061
1 84944
1 67688
1 65172
1 71530...

output:


result:


Test #11:

score: 0
Runtime Error

input:

100000 1000000
1 73499
1 81889
1 82753
1 44385
1 73003
1 63622
1 99555
1 56304
1 13586
1 41316
1 35869
1 12616
1 78335
1 84348
1 90858
1 6768
1 82573
1 64491
1 45118
1 58193
1 53357
1 81648
1 4973
1 84150
1 22589
1 70540
1 99417
1 2529
1 19565
1 72552
1 20394
1 25954
1 54266
1 20695
1 58990
1 67578
...

output:


result:


Test #12:

score: 0
Runtime Error

input:

100000 1000000
1 60835
1 36133
1 65763
1 81275
1 6045
1 87998
1 83691
1 82060
1 69773
1 52034
1 94002
1 76401
1 30782
1 11210
1 16938
1 21216
1 89753
1 53346
1 18548
1 44585
1 92668
1 19700
1 39610
1 48968
1 90915
1 67350
1 54693
1 82923
1 36106
1 87963
1 78415
1 59780
1 44868
1 58038
1 97088
1 8764...

output:


result:


Test #13:

score: 0
Runtime Error

input:

100000 1000000
1 2624
1 429
1 70324
1 94419
1 52098
1 4862
1 2509
1 61264
1 93264
1 24464
1 29655
1 46845
1 66517
1 83250
1 59736
1 65081
1 29677
1 63592
1 60771
1 88032
1 8669
1 48225
1 49383
1 14
1 87086
1 61033
1 21871
1 95109
1 36040
1 97647
1 18264
1 23864
1 85549
1 55345
1 17763
1 44952
1 5596...

output:


result:


Test #14:

score: 0
Runtime Error

input:

100000 1000000
1 5306
1 79209
1 58089
1 68641
1 59709
1 19084
1 1344
1 7788
1 13029
1 88640
1 68240
1 75242
1 75935
1 57539
1 57347
1 67246
1 9132
1 1545
1 64361
1 74925
1 27172
1 60108
1 78412
1 59570
1 29856
1 86240
1 63281
1 3769
1 19067
1 89492
1 1200
1 49532
1 58957
1 24935
1 57301
1 7826
1 512...

output:


result:


Test #15:

score: 4.16667
Accepted
time: 26ms
memory: 18288kb

input:

100000 100000
1 2663
1 94991
1 14540
1 38935
2 7618 90208
2 6332 93474
1 81964
1 92772
1 64411
2 4770 93295
2 261 92940
2 4375 94105
1 51875
2 3440 96602
2 3107 93825
1 52900
1 81825
1 18215
1 89522
2 5133 95021
1 96449
1 65367
2 1221 91929
1 78330
1 25039
1 83697
1 28411
1 28235
2 5184 95095
1 3156...

output:

243116
255834
298206
303757
301426
320064
314011
334543
334407
369429
361775
372450
370865
380326
388450
365190
372140
386140
398660
381331
390043
381015
391825
369829
399106
378396
392816
364860
399333
397631
415600
423524
410676
420889
412590
394801
431906
426998
376206
418445
442244
424464
406234...

result:

ok 49760 numbers

Test #16:

score: 4.16667
Accepted
time: 19ms
memory: 17852kb

input:

100000 100000
1 24884
2 42193 63114
2 12835 78537
2 47571 93329
2 33071 67840
2 31371 33540
2 45542 82514
1 14455
2 36133 66441
2 19447 69233
2 18179 99560
2 12111 50274
2 82544 85932
2 49284 70869
2 17192 68542
2 12462 52795
2 66689 68770
2 75965 82259
2 52475 86313
2 5254 5710
2 37703 83293
1 7214...

output:

41844
119357
91518
69540
4340
73946
60618
105011
169469
84413
6778
43172
110394
89104
4164
12590
67678
457
91182
131458
157387
70108
144763
7872
73940
97684
23844
33636
29412
102296
211173
111234
145604
86989
173634
177633
33197
86812
68233
232964
42216
14277
70279
52760
112481
130224
52680
22503
14...

result:

ok 79761 numbers

Test #17:

score: 4.16667
Accepted
time: 25ms
memory: 18188kb

input:

100000 100000
1 81747
2 31756 74163
2 13561 58425
2 38121 63653
2 49749 52757
2 12465 89247
1 14763
1 13440
1 71435
2 76886 93001
2 52822 57153
1 97449
2 6324 10017
2 25714 69181
1 86055
2 15991 36145
1 43602
1 48123
2 32589 92016
2 53936 71468
2 48484 51289
2 4982 9323
2 8943 60747
1 3064
2 20760 5...

output:

42408
44865
25533
3009
84284
37093
12996
3694
133407
41166
194420
52599
8659
4342
180696
148489
263112
15264
355262
153605
359101
254183
309065
3336
291227
14974
204568
49858
307743
105597
10254
71214
224669
220312
115733
263363
220406
262689
225433
299434
298757
91683
127412
60258
31791
280911
1211...

result:

ok 50017 numbers

Test #18:

score: 4.16667
Accepted
time: 24ms
memory: 17948kb

input:

100000 100000
1 38764
1 61409
2 3016 54683
1 45867
1 36421
1 22224
1 96005
1 85738
1 36687
1 8821
2 50514 65192
1 83652
1 64096
2 977 85114
2 34818 78357
1 69503
1 12890
1 78346
1 90700
1 10743
1 1859
1 60451
1 22251
1 16291
1 41259
1 10052
2 1257 37427
2 4379 43742
1 45422
2 43786 96870
1 83847
2 3...

output:

83508
44037
309140
143805
194491
214109
162606
9240
15618
44421
132789
209450
42610
279414
52071
158740
106965
313904
385549
31383
138840
9237
177066
218161
116591
34332
117725
9978
136297
171515
472116
355243
191992
82701
35652
60978
209808
221806
182536
87924
71511
184924
74331
225425
352458
87435...

result:

ok 20062 numbers

Test #19:

score: 0
Runtime Error

input:

100000 1000000
2 4911 50410
1 18088
2 5195 60114
1 66894
1 65264
2 53839 57562
1 64194
1 91
1 11325
2 2404 84967
2 15644 59062
2 7662 22604
1 26614
1 42520
1 19543
1 16866
2 17622 69362
1 71238
2 28270 75604
2 16675 96147
1 51283
2 11061 38681
1 24535
1 22493
1 39994
2 81216 92230
2 9388 65396
1 465...

output:


result:


Test #20:

score: 0
Runtime Error

input:

100000 1000000
1 53425
2 30982 39737
1 67975
2 74292 83400
1 82761
2 45128 50241
1 96414
2 68516 81468
2 18342 21086
1 70683
1 91858
1 72179
1 91048
2 48543 51109
1 26684
2 54936 71148
1 8139
2 24875 58961
2 44353 92619
2 32778 78210
2 13383 83090
2 6616 31035
2 68739 98635
1 38315
1 97083
2 77033 9...

output:


result:


Test #21:

score: 0
Runtime Error

input:

100000 1000000
1 17727
1 15420
2 9034 93216
2 14196 70538
2 18132 28441
2 12607 51931
1 32242
2 4334 97259
2 11727 59701
1 92605
2 25817 99001
2 66613 94016
2 11924 44027
1 95138
2 57853 92274
1 60723
2 7848 65584
2 7913 57275
2 2983 97596
1 19883
2 50838 61901
2 46102 55845
2 8990 90056
2 18614 844...

output:


result:


Test #22:

score: 0
Runtime Error

input:

100000 1000000
2 30380 90974
2 19653 98082
2 35889 38945
2 5632 77153
2 12370 93208
2 41484 94976
2 30647 76253
2 16639 46690
2 2326 65175
2 54409 70309
1 1
1 2
2 26996 37077
2 18322 85952
2 71036 82796
2 16794 22081
2 21893 26538
2 54398 63568
2 56557 92249
2 69039 83022
2 55448 62890
2 27603 51211...

output:


result:


Test #23:

score: 0
Runtime Error

input:

100000 1000000
2 42 91533
2 6335 93500
2 9170 94276
2 1479 90642
2 6963 95536
2 5706 91855
2 3282 93173
2 9962 99509
2 2996 98058
2 4828 94564
2 2392 95396
2 3903 99847
2 293 97618
2 7422 91284
2 9719 90105
2 5448 98274
2 4772 98462
2 1870 90088
1 1
2 5668 93701
2 7036 90106
2 8704 96189
2 1323 9966...

output:


result:


Test #24:

score: 0
Runtime Error

input:

100000 1000000
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
1 11
1 12
1 13
1 14
1 15
1 16
1 17
1 18
1 19
1 20
1 21
1 22
1 23
1 24
1 25
1 26
1 27
1 28
1 29
1 30
1 31
1 32
1 33
1 34
1 35
1 36
1 37
1 38
1 39
1 40
1 41
1 42
1 43
1 44
1 45
1 46
1 47
1 48
1 49
1 50
1 51
1 52
1 53
1 54
1 55
1 56
1 57
1 58
1 59...

output:


result: