QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#876630#9649. problemMaMengQi0 1650ms10844kbC++14906b2025-01-31 09:40:312025-01-31 09:40:33

详细


Pretests


Final Tests

Test #1:

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

input:

1997 13 2000
173 1173
1390 1848
339 1283
846 1672
644 791
898 1884
68 79
29 907
298 641
835 1004
564 1315
262 332
826 1380
1067 1186
460 1355
1447 1635
290 589
1094 1851
190 1038
653 1932
349 733
1810 1883
147 1942
207 566
12 60
56 1819
423 1274
1603 1966
297 803
522 524
1510 1940
492 602
1397 1669
...

output:

693986617470921428
-5530489399206071400
693768748957497991
1136543261304242345
4777749215121663650
-3618196383802050952
6297565863405687185
199770146804629327
7863725197767757575
-3742009536347032553
-3064146437389268988
7483514147546951209
-4091880273622516735
4882980722354621470
-43696061199164797...

result:

wrong answer 1st lines differ - expected: '998807601', found: '693986617470921428'

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 5884kb

input:

1995 14 2000
639 1231
475 679
12 179
719 1451
335 1415
1135 1460
954 1346
1172 1278
621 843
618 954
649 1076
161 1884
359 1597
1006 1347
1048 1768
875 1892
1311 1621
71 1435
177 679
393 597
403 1155
54 1028
353 1426
275 1555
377 1609
1456 1682
430 1607
866 1547
248 1224
181 362
251 1966
1024 1243
58...

output:

-3445762910264218728
5610703334753165924
7521882877051734286
2220613980613542746
-6365668676821076193
5047660945756059496
-5093765111390069775
4959176400969901811
-1588194791975870181
4038227203061104957
-8232161933013561485
1277475878812587049
1956073360478383254
-8227177911779295829
-1128452417942...

result:

wrong answer 1st lines differ - expected: '420910086', found: '-3445762910264218728'

Test #3:

score: 0
Wrong Answer
time: 1635ms
memory: 8548kb

input:

100000 1 99991
65936 91366
18231 94904
78136 98982
5923 55572
56154 56976
16519 51688
27114 85795
13841 66508
53501 64992
55262 85456
45291 51763
9150 22167
40160 71640
8594 93216
41460 54569
50758 87075
37891 46819
52457 92063
69325 93799
60846 98645
36339 37980
11741 87836
77374 95597
28033 35884
...

output:

1212752554
1119571762
1235103570
327378579
1257311846
1329849363
1171999843
861365006
1411426155
1482345584
253143218
1193340844
990486650
133701628
1183129618
1373557574
1304422212
607107860
717558834
1131566370
683232801
1127655812
1173402162
1364413201
265122640
1350562818
885858234
236576306
775...

result:

wrong answer 1st lines differ - expected: '46000641', found: '1212752554'

Test #4:

score: 0
Wrong Answer
time: 1632ms
memory: 9420kb

input:

100000 1 99991
70681 88140
67484 73681
15674 17415
40078 92459
15898 50120
16610 53929
75031 88822
14066 61564
29232 84223
35743 49204
19675 59272
19358 36024
32317 33158
74824 75761
41091 94834
30508 68857
8299 48927
22137 87187
2539 13740
9651 92567
3498 79569
48919 69930
68914 75113
85947 88542
4...

output:

1304341270
1400385398
189428762
1392499468
1377906534
319151384
135241381
1460447299
228017551
1252284035
221386550
491685808
1462765011
1454314494
1268604650
1422950813
1148891603
1411457310
1089375844
915537132
421801129
-160001393
1261277037
252357254
1401137115
-131845685
775949962
1240032567
84...

result:

wrong answer 1st lines differ - expected: '441273681', found: '1304341270'

Test #5:

score: 0
Wrong Answer
time: 1650ms
memory: 9068kb

input:

100000 2 99993
2296 57055
26675 72223
9679 27823
62383 76529
16853 39940
10325 20898
19366 69708
53993 56313
77391 96491
13978 50720
3786 37923
48673 94619
5358 75806
46280 87238
18687 40867
35935 96769
61227 73365
51789 87609
4062 63235
15544 95143
4474 18830
80698 93112
26529 33118
21662 97902
421...

output:

65260737029376
30288122077207
62459087861027
3712445007766
66342069432733
17341991753688
27434482533586
29404650648103
69567116339805
61554767830479
24821385059463
65012888875220
25566849703270
32132167595970
66211144969964
47069320505720
56379926037541
70413666746980
54210158705348
65745484192445
7...

result:

wrong answer 1st lines differ - expected: '641656749', found: '65260737029376'

Test #6:

score: 0
Wrong Answer
time: 1631ms
memory: 7908kb

input:

100000 2 99997
82850 86533
21477 72747
44515 73151
43388 99270
380 19701
10415 14627
7327 67283
3871 25907
8113 60732
14469 61755
11296 79602
4827 86722
67963 99579
1551 89254
51137 62105
40201 78226
55827 75474
84980 86518
67108 96450
955 11244
46063 53285
27109 33270
12634 50773
12280 83265
1874 5...

output:

4830559321600
58350548995200
5291716654905
12998890205127
28710555089904
981471020703
56209907921217
5812210698087
11392697256501
28201050310731
68095831929090
55681858394528
40027832937972
57711464255700
16231371167621
67207707698419
12153644479373
47717462335509
19258537756554
-5543610718479
17576...

result:

wrong answer 1st lines differ - expected: '307395947', found: '4830559321600'

Test #7:

score: 0
Wrong Answer
time: 1635ms
memory: 8936kb

input:

100000 2 99992
48714 63403
70730 75716
77838 95799
70748 77544
79445 93524
10505 16868
34546 39392
6334 75622
24973 38835
78217 85341
53985 94613
23547 33283
25528 93800
58967 89124
14035 37216
83633 87813
10287 58939
15055 21248
53857 54345
19069 51536
20443 44548
85297 94353
9609 26741
46002 79028...

output:

41677962874283
58091772248427
54089166266476
1648832987829
10839951398026
9580713376604
14371598631987
69810804611028
68861650576738
69676976927244
50198405835253
26765115001063
32985629629705
66932481832029
62410120579653
57674574459472
69642802737572
37249778746147
48658932464077
-49536049143349
3...

result:

wrong answer 1st lines differ - expected: '949409790', found: '41677962874283'

Test #8:

score: 0
Wrong Answer
time: 1640ms
memory: 8488kb

input:

100000 2 99992
45488 68149
21789 63088
49821 79788
11699 74930
39188 53963
10597 43299
72165 87309
55884 78248
36854 97726
33119 66158
2122 19856
47140 66459
55317 74581
5983 56291
33261 47486
30104 59770
20835 45100
55978 77834
41583 43967
12992 67637
10329 79090
43486 88141
33853 73553
36620 64391...

output:

69558798822896
20267643655727
64449515220542
24184212929135
58487941712935
2725493078887
18229780063011
3136325784221
47312925989992
37046625012944
63589641067295
68555812673486
3411646537191
36970179552070
56038559243472
66018699106343
36688062735593
26011616290994
62278495331649
45627153820260
626...

result:

wrong answer 1st lines differ - expected: '34747980', found: '69558798822896'

Test #9:

score: 0
Wrong Answer
time: 1643ms
memory: 8808kb

input:

100000 2 99992
14111 31862
566 12341
45996 96480
11816 54367
14403 98932
12839 19198
35226 75192
27634 58675
34872 61966
48193 62610
9632 94240
76668 93701
49539 66738
56161 87592
861 76679
3202 15499
23948 38696
23412 75205
28820 77182
7930 98402
13544 76110
10187 49225
58097 96172
27238 60153
3097...

output:

31184099512190
19221168550543
29855539857027
16813029617579
49038381289779
6862519419365
20490078701128
69319404386159
39117937266253
58804462194211
69333847834483
69159889143461
17961600911969
40697674969850
2616605787355
54803667474193
63892506003335
69284210840290
-164047917753552
54911201171326
...

result:

wrong answer 1st lines differ - expected: '633545272', found: '31184099512190'

Test #10:

score: 0
Wrong Answer
time: 1642ms
memory: 8024kb

input:

100000 2 99997
18856 61339
3535 37403
17980 47764
15999 88522
25972 74842
6568 19288
37003 83143
6397 7896
34719 65594
4482 26359
17141 35919
40262 62684
24303 43760
23327 77712
43835 63201
57790 79338
73509 85844
5280 58141
48762 67293
16517 56735
50403 80703
43012 68375
16933 42984
45516 85152
591...

output:

2480697111651
70166753722838
20504410238343
40437220410350
68505073464481
10840825421180
44880445688132
39582483347038
14090223139185
21318425740187
26451235564746
67105639194078
9383153687915
65576103587263
67636227734906
70245830205725
54408511330922
57012624471687
35636224005763
57661413542960
81...

result:

wrong answer 1st lines differ - expected: '365035455', found: '2480697111651'

Test #11:

score: 0
Wrong Answer
time: 56ms
memory: 7912kb

input:

100000 7 99994
28 510
109 195
94 284
69 346
63 80
504 508
19 245
194 333
86 498
58 79
116 511
203 322
46 301
373 445
312 461
215 330
18 36
65 297
323 363
412 419
141 299
398 451
80 358
24 332
244 316
145 481
293 339
55 278
55 269
8 448
197 479
333 474
90 442
5 339
32 62
137 419
398 419
14 474
135 13...

output:

-3563297686896689226
-8107246126542979482
-4081601113745294175
831602127609296702
-8697892525398252170
-259020322221571046
3060675528672438598
-4085985142690435558
5657856543107785502
-2625618663523145276
1509391575423437242
2213959561810640201
-3941359647057267730
859084043309319367
-20174513053237...

result:

wrong answer 1st lines differ - expected: '384285535', found: '-3563297686896689226'

Test #12:

score: 0
Wrong Answer
time: 50ms
memory: 7916kb

input:

99998 8 100000
258 356
12 420
248 445
93 332
6 465
295 403
141 490
360 497
73 391
126 277
496 509
96 160
25 451
187 448
77 153
349 363
62 108
64 217
183 374
116 328
23 450
48 289
60 494
45 370
11 438
133 243
150 299
483 500
170 350
125 481
125 248
151 491
45 140
299 487
129 401
213 238
263 458
135 1...

output:

-3978692462411140639
-522111879126708187
5429706456573286516
8546602848096662369
-8365011503294323752
6181288752724795775
2297531479780541568
-2801921028218632691
796631897251196286
225006806480723003
-8730062271053568926
7861010479382341571
-5281876740076174397
-6591022131525002671
-747016300145194...

result:

wrong answer 1st lines differ - expected: '103987123', found: '-3978692462411140639'

Test #13:

score: 0
Wrong Answer
time: 860ms
memory: 8188kb

input:

100000 3 99999
32543 49636
35941 53122
39591 56695
6883 23920
42561 59721
16402 33474
42089 59282
54626 71682
69330 86526
82522 99681
47813 64898
31468 48577
23183 40210
56283 73377
41913 59104
27813 44937
24035 41053
17202 34256
37982 55149
58324 75441
51947 68980
69354 86547
81529 98641
18665 3572...

output:

-474549786178191990
25644003131668605
-484687692068093159
25663351256322658
25364143470769218
26120218676631826
25845177684096961
25444541849478475
-493966888396145193
-477760917062153287
25868025063476888
-479140312974024106
25744961207589194
25468189767687673
-474523707235441842
-47792817380881315...

result:

wrong answer 1st lines differ - expected: '292969726', found: '-474549786178191990'

Test #14:

score: 0
Wrong Answer
time: 954ms
memory: 10676kb

input:

100000 4 99994
43442 62691
13722 33004
48998 68198
11841 31095
28132 47426
79825 99019
27945 47234
14991 34298
56789 76010
37059 56283
17994 37286
80761 99923
15924 35207
25700 45000
58792 77966
42822 62070
55904 75102
51313 70577
17338 36634
33030 52263
26407 45702
38841 58087
48743 67950
4572 2377...

output:

-7359889777937973056
-6272767898139586792
1742968268667137842
-4221475707211271740
8510468198441059779
2467847784020418646
-6024198478603555764
3005530309523880822
-8990273342888365971
3165814258812245825
5349417621171565933
-8313607989405766378
2539390185080315772
756514542930814959
321343932490700...

result:

wrong answer 1st lines differ - expected: '804826713', found: '-7359889777937973056'

Test #15:

score: 0
Wrong Answer
time: 586ms
memory: 8808kb

input:

99998 5 100000
54935 66393
67394 78811
36393 47848
28287 39745
64256 75655
3416 14837
62810 74237
15574 26961
27519 38957
12640 24021
34061 45544
81657 93046
29668 41110
60969 72385
39212 50669
10590 22036
21820 33237
75911 87318
50363 61837
85536 96972
16574 27978
27716 39155
43703 55155
52139 6360...

output:

8053514254998975462
4651236738395810271
2449768609811400281
3019087326405529797
5665810835717873524
-3099030249120576102
2022588002854925058
7695969624742126060
4408906053439334437
6279089258395632333
-6822326871349210885
64009989311807160
6889756030734798508
3754853825633499071
-402471097042861339
...

result:

wrong answer 1st lines differ - expected: '141469878', found: '8053514254998975462'

Test #16:

score: 0
Wrong Answer
time: 676ms
memory: 8668kb

input:

99993 6 100000
60046 73510
76743 90353
27819 41261
41945 55410
47263 60852
81275 94950
60884 74362
8070 21589
26792 40260
73860 87502
66467 80049
55282 68842
47250 60838
67914 81497
79147 92797
35992 49417
46246 59796
46324 59884
44798 58306
27714 41158
19818 33333
24670 38145
1298 14867
21186 34690...

output:

8673723403722616216
5064397908773276785
-1802961046275443857
5633834538714188877
7551744732779466769
-2748195428517702408
-5039332796723756588
2371570771852690150
224286475924950940
-1323945957285635370
-3346328378757221931
8325295567658504297
-3622798709352811528
1421514873735828637
-31742362584748...

result:

wrong answer 1st lines differ - expected: '893388017', found: '8673723403722616216'

Test #17:

score: 0
Wrong Answer
time: 778ms
memory: 7916kb

input:

99992 7 100000
46709 62298
43845 59423
57608 73174
8380 23971
19686 35150
29121 44618
1189 16899
77233 92964
54510 70048
1366 17075
63662 79263
41721 57285
78703 94414
16275 31839
71866 87509
45626 61226
25380 40827
63233 78854
24302 39727
72140 87796
75448 91154
66375 81966
44357 59954
58893 74503
...

output:

-970424280183312437
3446782586787222116
-2532228561334960836
-68465607762084003
7701322835251985738
7846502339792139477
6737667520204905571
-7979467710738515605
8954107569889074644
-5313703629601337366
6499388073581034847
-4983225701322266777
8253593217445932370
3190078993233835381
87891457003203062...

result:

wrong answer 1st lines differ - expected: '164257914', found: '-970424280183312437'

Test #18:

score: 0
Wrong Answer
time: 564ms
memory: 9064kb

input:

99994 8 100000
65934 76851
57966 68909
52727 63644
9222 20158
75411 86373
28837 39739
88037 98979
52361 63310
14371 25383
49419 60352
9448 20401
87487 98458
23620 34585
7173 18125
60612 71502
74819 85797
55595 66567
4278 15237
8169 19086
88396 99329
31853 42703
44761 55565
80386 91426
55576 66544
37...

output:

-8154598499944101961
4830189780056223259
-5341132329501142611
-352694309982398356
-2777358598931550356
1958400569660649251
-6662613346996867470
1365735146808082282
811733493097500209
5783591701232553452
-5208184867477269860
-6447238776463749949
2774153310620726450
-6714557325883544282
-2977293688514...

result:

wrong answer 1st lines differ - expected: '674884528', found: '-8154598499944101961'

Test #19:

score: 0
Wrong Answer
time: 766ms
memory: 7816kb

input:

99993 8 100000
27852 43018
65883 81212
55196 70592
66316 81648
60797 76161
10804 26079
3544 18697
61916 77265
49713 65101
80135 95471
8532 23772
23610 38740
79696 95032
18137 33318
70569 85974
44133 59536
16455 31626
40549 55877
53460 68867
9924 25192
17320 32454
63023 78373
68019 83342
23888 39026
...

output:

-7494743472842682286
4362536555959033942
5750632038687003912
-2350871138326972118
-1772439519776617450
-8709811047290795837
-1572221257925416881
5794269206037735721
-322710858301195057
-2675158969048441714
607917631775099608
-9096492056891645438
-3591862148406916787
-2815721127067624664
311498563485...

result:

wrong answer 1st lines differ - expected: '705277784', found: '-7494743472842682286'

Test #20:

score: 0
Wrong Answer
time: 974ms
memory: 10648kb

input:

99993 8 100000
4756 24312
12546 32006
56275 75922
30611 50207
58142 77797
11390 30842
69103 88760
20148 39670
61197 80850
2128 21632
45720 65404
4425 23981
34976 54654
44329 63987
23725 43324
79298 98996
21104 40646
24114 43700
35228 54890
63635 83351
12264 31726
62034 81706
42628 62284
15486 35013
...

output:

-1880163115855220057
940790065351440076
9089106665681353478
-7791936655559462364
-670420200301448598
3070895091152461945
6740127336929086318
-2188111336632875511
-6181407733719010856
-7458146624373788013
-6738494039057481127
-2262087967084376654
-5883481122536384710
5139476284662718970
3029796455455...

result:

wrong answer 1st lines differ - expected: '855873060', found: '-1880163115855220057'

Test #21:

score: 0
Wrong Answer
time: 1645ms
memory: 8996kb

input:

99997 6 100000
52795 76204
60242 94846
80082 89521
43789 83470
7347 17593
56216 67092
15233 91115
43430 52679
8086 21418
60025 82527
86078 94448
4145 27768
22185 40688
84161 88178
10627 48034
56113 60342
6327 66377
59696 81615
12544 43539
48748 75319
17899 80605
62730 88402
6995 14597
9331 23660
143...

output:

-851409258766340307
1220942235621590907
874991199725652056
-3155107206285339207
-5897306685806656021
2558528408074630965
7682502689328315125
-3149439444590695345
2976953889866172908
119512430804294893
4032246391611771998
-859931086024423801
8034371792751444790
4827366867308427881
7972835130603056798...

result:

wrong answer 1st lines differ - expected: '341223509', found: '-851409258766340307'

Test #22:

score: 0
Wrong Answer
time: 1637ms
memory: 9016kb

input:

99992 7 100000
27128 54642
18776 48660
32020 81911
14635 52281
16313 49793
275 70381
3805 42531
32208 71097
22894 99371
4608 26589
2806 44204
47466 63243
48834 54881
27929 63878
27969 76632
20642 27385
14924 70165
16798 69834
29534 62692
76109 86503
37454 59613
6607 86600
1486 45880
7851 48183
3446 ...

output:

4595196057574767476
7415925904078255520
-6892185133930819610
-8192114880082547359
4780003328953449740
-304907785005038091
8153364956637498840
-672400430476223536
801847581968494862
-2085885217517372959
-9132200972174678424
-8060242650746184291
94427887998461132
4006335216900682953
-54738271956306800...

result:

wrong answer 1st lines differ - expected: '765452205', found: '4595196057574767476'

Test #23:

score: 0
Wrong Answer
time: 1629ms
memory: 8932kb

input:

100000 8 99992
5525 88336
10461 93311
51747 91464
79890 89815
7705 13107
52076 64416
67400 81448
9571 24878
98891 99644
25122 79242
43829 70517
38851 76280
60902 72914
24253 41795
65752 75779
14486 83346
50461 60069
60825 83759
56425 84253
14562 41434
28226 77220
11636 84979
43610 72498
23200 61206
...

output:

-8487043856362885402
-8077725473199774501
-1846733182877134757
-7765485954206702591
627758219114786384
-1282589771048430704
-5998826823578948142
-5240823134541297403
-912847439545714474
-4049937004171557774
-32065977233371681
7141552848788137461
6963677412421352114
7836523916395163019
-4889175078439...

result:

wrong answer 1st lines differ - expected: '714876740', found: '-8487043856362885402'

Test #24:

score: 0
Wrong Answer
time: 1642ms
memory: 10844kb

input:

99996 13 100000
60077 60586
53452 64015
46838 89521
41235 50247
61110 70098
33221 77330
30075 79794
66972 79753
23114 76719
90895 93753
1570 12671
3476 16878
24750 97834
20280 68598
38680 53438
36049 48880
33061 56218
24232 79949
32570 75213
74546 95579
17573 96857
73405 85369
11909 16394
15237 5298...

output:

3503016341283434714
-1668366757714942136
-135179855292481266
6694605554692137411
7544371357535790492
-2002778240508526665
-5433966478671276384
2583617316108510993
-481749662876757421
6308595217610965155
-4361228446485368516
899272627591650813
5781723244218282031
1931069491708704490
-4681958345434994...

result:

wrong answer 1st lines differ - expected: '741716899', found: '3503016341283434714'

Test #25:

score: 0
Wrong Answer
time: 1627ms
memory: 9324kb

input:

100000 14 99991
11683 30464
36116 93179
11630 72529
67922 83994
88958 94896
38498 53213
68662 87187
19199 42279
40847 61376
52053 76046
72860 80526
7846 28669
76791 81298
43954 61353
48538 86251
24262 90689
8142 52015
32987 68879
48867 59608
9690 40919
52857 74611
74249 80744
24417 81484
33024 48134...

output:

4217629402020015712
3333050642714182086
8807116769230154689
8206187065008347884
-8508548910898517384
1064695126251462626
5630538089686229941
4915127983224920406
8120922575332980048
-4614839197150285210
-1036942405439715388
-1029711477280515461
9030049379461208359
9063820133466369916
8155142202954148...

result:

wrong answer 1st lines differ - expected: '476842798', found: '4217629402020015712'