QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#796081#9649. problemcarrotqq0 538ms62380kbC++142.8kb2024-12-01 10:11:542024-12-01 10:11:55

詳細信息


Pretests


Final Tests

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 17000kb

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:

422717104
79310246
14248213
903146263
57407297
510367601
235579780
584658774
184182764
878051848
669189406
307394052
948361416
23820217
523905252
488054704
90220887
546903962
296961248
392999672
123440107
767402000
39183479
62730363
600512242
736162281
710891545
722424699
585624397
967980818
7619926...

result:

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

Test #2:

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

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:

437086657
433188790
515456529
237890774
133492735
333765247
138298964
142466796
773697194
171311863
300819220
896928782
419990895
536201021
2331215
729485803
675806965
984955131
635873208
247699176
631317745
532269600
983093436
568848346
279123666
207543530
88649776
22266438
50793491
847990449
92559...

result:

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

Test #3:

score: 0
Wrong Answer
time: 223ms
memory: 52640kb

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:

347875857
55157695
878170579
927892460
334780131
268131140
345787511
616896458
822196197
608451855
54431954
564314412
487625861
663138477
509037182
626199261
2063859
231777662
109828446
67486356
368177513
398687744
5175003
15023837
468923546
955190865
341450715
504968246
888603406
288640024
45269623...

result:

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

Test #4:

score: 0
Wrong Answer
time: 210ms
memory: 52220kb

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:

907316230
530326355
652328926
408369032
592671133
820870098
261396347
416812483
560339933
575116438
155703768
235796157
934284614
260652775
605494129
821515701
462557109
744783506
254521
632704060
345843556
65034931
544048973
448745842
213216995
370160140
182142977
444815822
4986597
867907698
923094...

result:

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

Test #5:

score: 0
Wrong Answer
time: 234ms
memory: 53132kb

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:

595300226
988084244
123033173
630341584
337478748
966319165
715563919
54654325
843504795
346981672
839392255
115257444
383635562
468178607
566974146
754942660
145870065
810243738
891163169
547714797
346670161
906926017
494165936
334785331
818590633
662818337
522172205
683918221
272837916
145473271
4...

result:

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

Test #6:

score: 0
Wrong Answer
time: 227ms
memory: 53660kb

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:

723249060
704335930
973638530
940051615
54775697
384460488
501226147
848646095
277233600
268831666
173170235
300865009
226665881
327750546
741186748
970903318
443529535
551923686
628424711
878872386
233316083
201946791
567440475
579276628
791940975
549940360
698799526
408859409
742491652
780875488
2...

result:

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

Test #7:

score: 0
Wrong Answer
time: 250ms
memory: 52944kb

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:

119816198
9524003
205409982
943305666
562254401
836158458
712214550
24189899
666470475
690299817
820859420
262349735
308061468
817538284
228720450
727706697
259254292
575962479
268385294
713684090
254597102
296290662
16861792
799572844
258652698
658358638
877099124
581031193
167789022
831650094
4307...

result:

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

Test #8:

score: 0
Wrong Answer
time: 237ms
memory: 52820kb

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:

65157593
391532501
258075255
876949115
90499218
160740733
848713164
603264318
321975933
882898423
176482616
163781972
266349555
106019157
202176236
311696765
73278198
669431882
402803830
247257403
48729876
159926377
906922612
92961767
621878802
978026603
881610227
100543509
450514577
219634485
46339...

result:

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

Test #9:

score: 0
Wrong Answer
time: 234ms
memory: 53092kb

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:

631847521
736505297
951843806
31644448
644179027
562501587
625433427
96678281
36035153
686635560
89484743
405145499
927485356
743662815
430508233
593102474
493374568
716622022
251987224
969102975
557697574
483208408
260210625
308547099
324951007
247755278
254877407
223048261
777864545
514553881
2098...

result:

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

Test #10:

score: 0
Wrong Answer
time: 233ms
memory: 52884kb

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:

202848396
180653302
149557448
615084341
995185980
468390542
882462232
256433530
662324465
714319227
537949145
925049541
324965636
29333706
769780229
830417795
776287057
206313996
415826512
423536403
833891917
301152000
268418105
70792416
275519006
377704496
546808107
330519305
284074949
734804890
56...

result:

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

Test #11:

score: 0
Wrong Answer
time: 218ms
memory: 47472kb

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:

699031462
454421938
976139693
443319978
876713714
637851942
512829982
617401968
787601088
775589187
626172923
149922979
458737641
910612427
44641635
174476996
524241308
239733697
351433284
186614425
621550733
954106283
565504374
924455880
28919
271701112
310950696
751298618
85355216
949243353
812358...

result:

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

Test #12:

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

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:

140376890
645645505
415655242
307540788
154372493
348772010
652949957
830017159
797866394
507064540
831460313
952075428
509701341
992463895
919042263
271327483
89584988
776012610
969984656
653031221
634228948
278720774
208929501
161021459
115558924
113544903
3453780
485416409
721106545
594150863
402...

result:

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

Test #13:

score: 0
Wrong Answer
time: 183ms
memory: 44468kb

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:

603009315
47582092
902902172
124747807
92245636
241575386
880250170
563584780
211593298
416311059
636999418
12450589
377155519
450621969
855554359
304686857
664617394
902070581
27442007
613854764
686212772
257554498
121321415
155642762
457642688
647692042
228423259
966380876
995763610
624827743
8167...

result:

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

Test #14:

score: 0
Wrong Answer
time: 214ms
memory: 45524kb

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:

23199006
970245572
538004662
759508210
849034769
408138858
37718875
891135016
191776344
924940151
988617098
684009942
931079265
734719447
212586647
531047158
632469993
56108101
55696397
431511068
913466720
671753562
882758149
811022087
703445725
122792974
27374927
126757875
508216810
994245527
13160...

result:

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

Test #15:

score: 0
Wrong Answer
time: 236ms
memory: 47560kb

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:

976918406
355981121
507018908
244615962
590398885
806524361
645352746
143608543
955221541
732853448
273999870
517413199
991297674
973229491
297938315
918825653
310339648
911072887
70257368
243048273
181366558
137610038
312820441
702100242
908887337
805085202
677889886
662945544
727606141
547877761
3...

result:

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

Test #16:

score: 0
Wrong Answer
time: 265ms
memory: 47020kb

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:

414660797
302930694
852716818
364725183
885772103
494952099
68336125
388442347
61015290
145483608
933258354
817029708
98194954
870483603
895555661
54500971
826655764
558127457
604017336
518867401
897129114
801366703
302412223
335773359
801672522
57399084
691195226
430693506
182237004
383710940
59961...

result:

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

Test #17:

score: 0
Wrong Answer
time: 291ms
memory: 48756kb

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:

826944929
404803375
623722649
37126697
942524289
62724858
592987976
972823247
512005075
91521370
245558612
158953286
510636650
474874596
995374546
136776102
237770053
487414679
65915883
560135427
449040096
379839184
245410204
453446950
187262850
418517232
728448002
160860939
77875488
381182156
87844...

result:

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

Test #18:

score: 0
Wrong Answer
time: 285ms
memory: 48644kb

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:

234911357
970056983
805248094
429278549
371204537
841848393
406761006
415883383
667036632
392009458
742784236
251413109
882648523
606229408
668957696
368735419
272496953
970275958
823532324
791898309
733363554
326859035
419221327
922686705
215575588
171174366
292893684
740633412
694375449
394310102
...

result:

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

Test #19:

score: 0
Wrong Answer
time: 295ms
memory: 48616kb

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:

444617870
576502185
271499914
970369539
494252789
300826668
768645234
517777923
120320582
101273816
553533035
793498860
270111596
831729312
862861488
220304504
250445797
151693438
780462887
937139316
486531474
713261290
967197049
760474605
94612404
704620498
422476992
900143492
945153915
945157577
2...

result:

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

Test #20:

score: 0
Wrong Answer
time: 285ms
memory: 48640kb

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:

161808425
251674568
138335462
434400664
378441215
672079247
898587389
398513231
922966540
939370501
125141485
843594855
75461301
475116896
71655797
265088444
369580183
62532720
561556031
742640497
823384085
971917525
185166169
633647081
359447785
787099011
728990440
920970699
19682086
610349925
2455...

result:

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

Test #21:

score: 0
Wrong Answer
time: 340ms
memory: 56652kb

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:

676398870
893605381
560853375
603921240
720773253
845660168
647865486
107284186
542035322
462145304
616568196
804104152
589603186
366113257
296828331
53113001
713467655
597382905
972862898
568631578
523102305
935581746
610344053
746100531
861367114
661752652
581840217
609510809
20442398
704669103
67...

result:

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

Test #22:

score: 0
Wrong Answer
time: 369ms
memory: 57820kb

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:

335194838
209578265
250812350
459350438
22123874
430471044
724789722
931404083
49546432
187908755
183941371
843945782
132826634
765309234
706589333
993457120
440228800
611074501
889738839
752899560
965127125
757436533
689352596
533311480
38334630
772201548
190259970
691193189
815257313
141587039
244...

result:

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

Test #23:

score: 0
Wrong Answer
time: 359ms
memory: 58028kb

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:

125592247
67088060
734242058
67529415
378369477
240101467
67373234
770153374
848740722
473710772
570342451
37419815
289141707
795295469
440661521
517643182
75286595
797274665
888345081
242536781
182658159
687730848
792007571
646304588
818527128
27833741
466480567
687930912
147172093
150295218
859593...

result:

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

Test #24:

score: 0
Wrong Answer
time: 535ms
memory: 62272kb

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:

449184056
407877118
692339841
913710155
842414600
128187351
926037278
918173971
514981536
718697900
346329525
653169214
88893832
701735487
71681680
805192853
293973581
247836714
186255019
914253087
826882315
214510362
337670339
756224696
670610216
261055636
310940436
198973911
635233596
907701444
55...

result:

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

Test #25:

score: 0
Wrong Answer
time: 538ms
memory: 62380kb

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:

905436329
98738484
127798496
703794718
971576819
510023738
84651623
962913969
338999955
27996297
506016502
131781117
876283814
704068937
888362256
697927151
108477969
784663207
554810723
277440019
530701432
290006090
699888476
528210497
784768316
106372704
681720352
96158124
209272116
943715411
5147...

result:

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