QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#807630#9642. 冲刺Fantasy_Ball100 ✓1013ms82888kbC++202.4kb2024-12-10 09:37:072024-12-10 09:37:08

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 378ms
memory: 82568kb

input:

4872 301135505 501969174
62 292
76 226
20 67
11 117
145 33
28 37
43 16
26 147
148 257
282 249
275 89
129 30
100 253
110 206
100 230
2 103
71 260
154 164
14 183
185 184
227 25
166 164
187 144
181 62
176 139
121 253
252 181
87 145
255 63
66 2
178 209
161 30
112 49
71 178
264 281
81 190
124 216
231 91
...

output:

354616342

result:

ok single line: '354616342'

Test #2:

score: 5
Accepted
time: 365ms
memory: 82484kb

input:

4868 135320924 895002559
284 240
284 300
259 42
233 262
209 165
50 294
80 300
300 110
288 4
6 145
65 55
3 167
6 160
120 150
104 280
227 253
105 33
203 262
294 263
295 187
91 255
300 99
188 86
294 90
230 117
96 33
86 255
192 260
86 180
197 13
71 0
65 300
201 21
97 253
168 157
292 64
293 72
41 189
24 ...

output:

871825364

result:

ok single line: '871825364'

Test #3:

score: 5
Accepted
time: 370ms
memory: 82520kb

input:

4859 596446395 415664961
2 2
151 224
107 217
257 82
260 287
63 174
115 93
185 58
58 75
142 289
11 164
149 248
217 186
124 290
70 257
233 107
149 195
213 128
283 258
194 80
110 284
30 173
228 11
296 134
67 85
229 255
127 39
168 257
282 90
52 290
182 114
259 248
236 133
273 81
226 174
51 153
175 58
27...

output:

536513995

result:

ok single line: '536513995'

Subtask #2:

score: 5
Accepted

Test #4:

score: 5
Accepted
time: 670ms
memory: 82844kb

input:

5000 732289608 658888527
232 5000
2921 5000
5000 3706
5000 4148
5000 2105
1771 5000
3970 5000
3729 5000
1614 5000
5000 151
5000 3553
5000 3405
5000 2869
5000 835
2673 5000
3238 5000
2853 5000
5000 999
5000 3
420 5000
5000 3025
5000 6
830 5000
723 5000
5000 851
5000 1210
1844 5000
5000 4389
2203 5000...

output:

857383782

result:

ok single line: '857383782'

Test #5:

score: 5
Accepted
time: 380ms
memory: 82296kb

input:

5000 336626419 159898453
406 406
1995 1995
162 162
343 343
4319 4319
3708 3708
4010 4010
1467 1467
4438 4438
4527 4527
1006 1006
651 651
4126 4126
2772 2772
2900 2900
4335 4335
2557 2557
4878 4878
2681 2681
4247 4247
2999 2999
498 498
3508 3508
763 763
2613 2613
4942 4942
2992 2992
265 265
61 61
387...

output:

416991066

result:

ok single line: '416991066'

Test #6:

score: 5
Accepted
time: 568ms
memory: 82876kb

input:

4998 461120374 615250340
2213 475
2143 1633
2783 4225
2836 2170
4351 3302
1920 329
3855 134
101 1479
923 1745
137 2736
3550 3699
1577 4494
3257 3319
3447 543
3936 3765
2998 2023
1101 2073
2219 1725
1506 299
1892 4119
3027 217
3380 4488
1183 4708
2649 2625
2137 3103
1321 2369
1828 4867
1995 3910
4289...

output:

120894451

result:

ok single line: '120894451'

Test #7:

score: 5
Accepted
time: 575ms
memory: 82744kb

input:

5000 629702172 58290522
1626 3645
1700 1024
3642 2481
3109 4291
4744 4067
1592 341
1072 2030
1149 4462
3804 3705
3347 4651
2337 1604
3706 3116
3956 3985
4946 2502
2682 2567
1931 1467
3824 1919
1947 2606
3067 1382
2463 3042
3181 1347
1419 2920
3258 2776
465 306
461 1080
147 4473
1467 1930
1163 2224
7...

output:

717105463

result:

ok single line: '717105463'

Subtask #3:

score: 5
Accepted

Test #8:

score: 5
Accepted
time: 672ms
memory: 82768kb

input:

5000 0 454262500
3448016 3452435
2687053 2686221
8169887 8172208
9741693 9745191
2134360 2132632
2223989 2222297
6946537 6946296
2695577 2695329
1450857 1451876
8453241 8451200
9107846 9110910
8988968 8987572
9169892 9169540
7695546 7690794
5077074 5072683
7532989 7530319
7944119 7943232
2293369 229...

output:

138390816

result:

ok single line: '138390816'

Test #9:

score: 5
Accepted
time: 702ms
memory: 82828kb

input:

5000 0 197940563
163633 159658
719510 720734
5037104 5036502
8688315 8690135
3351747 3354084
5798281 5794946
6424717 6429537
5861254 5863610
608280 613091
6383637 6385534
604115 604050
7594548 7591747
9744453 9746034
8498980 8499566
4552034 4547746
6470487 6470247
4965628 4965391
4626287 4629397
924...

output:

12953277

result:

ok single line: '12953277'

Test #10:

score: 5
Accepted
time: 669ms
memory: 82888kb

input:

5000 0 792777687
9990775 9987449
9990793 9995124
9994277 9998218
9994537 9992587
9994936 9999367
9994417 9997299
9994341 9991910
9990605 9990976
9993356 9991105
9990649 9989123
9992634 9991999
9993403 9991953
9990844 9992544
9990838 9986624
9991823 9989920
9993872 9994934
9994306 9989379
9994621 999...

output:

352309080

result:

ok single line: '352309080'

Test #11:

score: 5
Accepted
time: 968ms
memory: 82556kb

input:

4998 0 742045327
9771639 9776635
9329681 9334673
9925908 9930906
9882915 9887911
9052925 9057916
9414381 9419379
9825440 9830432
9006220 9011215
9182712 9187706
9399767 9404761
9298823 9303823
9164839 9169836
9617019 9622012
9039297 9044297
9761372 9766369
9802576 9807575
9758643 9763634
9581696 958...

output:

233419299

result:

ok single line: '233419299'

Subtask #4:

score: 5
Accepted

Test #12:

score: 5
Accepted
time: 30ms
memory: 44924kb

input:

5000 102882260 0
6819081 6816853
5149145 5145899
9892659 9895176
8631345 8627935
349191 353992
7035406 7036453
5912292 5916306
9657928 9662549
6200108 6198289
2101773 2106094
9309396 9307219
7369903 7374376
9787731 9790309
9108307 9103593
3772703 3768160
976239 977233
3825147 3825573
7626595 7626660...

output:

1002452599

result:

ok single line: '1002452599'

Test #13:

score: 5
Accepted
time: 30ms
memory: 43980kb

input:

5000 555602683 0
2276456 2279872
444955 447940
2811067 2814002
8547026 8545882
7689196 7687362
455321 458118
8354815 8351991
711149 714735
2873655 2876981
8278974 8281196
9070916 9074678
8636306 8631746
941904 938930
3037633 3037860
2507283 2507558
9813566 9811611
2448024 2451969
3676139 3680770
355...

output:

178037273

result:

ok single line: '178037273'

Test #14:

score: 5
Accepted
time: 56ms
memory: 44724kb

input:

5000 908333657 0
9994166 9996809
9991489 9994755
9993341 9994108
9991372 9992866
9994840 9990082
9994027 9989630
9993654 9993948
9992205 9989909
9994749 9995572
9992437 9993410
9991970 9987187
9990739 9992390
9994923 9997120
9993800 9992453
9991802 9996027
9990978 9995031
9993903 9992211
9990417 998...

output:

592206530

result:

ok single line: '592206530'

Test #15:

score: 5
Accepted
time: 59ms
memory: 43296kb

input:

5000 567725802 0
9389957 9394948
9142847 9147844
9206678 9211676
9679253 9684252
9375914 9380910
9989453 9994448
9883411 9888409
9557299 9562295
9010479 9015473
9175767 9180764
9508606 9513605
9794399 9799399
9249788 9254785
9254166 9259165
9662897 9667888
9090407 9095399
9466618 9471615
9458979 946...

output:

999241460

result:

ok single line: '999241460'

Subtask #5:

score: 5
Accepted

Test #16:

score: 5
Accepted
time: 370ms
memory: 82408kb

input:

4976 574513706 284978964
52150 52150
482959 482959
189922 189922
459237 459237
168102 168102
367208 367208
291040 291040
272705 272705
3179 3179
179983 179983
307014 307014
66641 66641
384965 384965
263794 263794
61297 61297
33430 33430
376221 376221
69803 69803
328604 328604
208254 208254
441178 44...

output:

685390943

result:

ok single line: '685390943'

Test #17:

score: 5
Accepted
time: 356ms
memory: 82524kb

input:

4977 738732183 48211757
224643 224643
231072 231072
350520 350520
353788 353788
177601 177601
266218 266218
54772 54772
441204 441204
126298 126298
210653 210653
406849 406849
89882 89882
399624 399624
6984 6984
230890 230890
449088 449088
206247 206247
286000 286000
177809 177809
351108 351108
3601...

output:

834673621

result:

ok single line: '834673621'

Test #18:

score: 5
Accepted
time: 360ms
memory: 82364kb

input:

5000 82619521 288046394
499070 499070
499507 499507
499421 499421
499996 499996
497341 497341
499880 499880
498466 498466
497215 497215
497717 497717
499041 499041
499450 499450
498373 498373
495077 495077
498387 498387
499689 499689
497281 497281
497675 497675
497312 497312
498371 498371
499832 499...

output:

256096624

result:

ok single line: '256096624'

Subtask #6:

score: 15
Accepted

Test #19:

score: 15
Accepted
time: 365ms
memory: 82364kb

input:

5000 235325377 512694546
5854662 5854662
315229 315229
3137556 3137556
7608068 7608068
9583921 9583921
4958765 4958765
3109547 3109547
3431604 3431604
3400130 3400130
5073586 5073586
2742677 2742677
5111263 5111263
5485216 5485216
7602789 7602789
1522223 1522223
2264844 2264844
8283226 8283226
80915...

output:

374571076

result:

ok single line: '374571076'

Test #20:

score: 15
Accepted
time: 374ms
memory: 82352kb

input:

4999 577526640 536592123
8982831 8982831
8658108 8658108
3051124 3051124
6249675 6249675
736542 736542
1907066 1907066
7853081 7853081
4392691 4392691
6371987 6371987
7681658 7681658
367808 367808
4584307 4584307
6635109 6635109
1920456 1920456
9443645 9443645
7198022 7198022
4573392 4573392
8832798...

output:

858926241

result:

ok single line: '858926241'

Test #21:

score: 15
Accepted
time: 353ms
memory: 82292kb

input:

5000 967858359 21174968
9997118 9997118
9998285 9998285
9996180 9996180
9999627 9999627
9996927 9996927
9999741 9999741
9997786 9997786
9997212 9997212
9996650 9996650
9996632 9996632
9996692 9996692
9999548 9999548
9998795 9998795
9998904 9998904
9997909 9997909
9998051 9998051
9995365 9995365
9995...

output:

236292211

result:

ok single line: '236292211'

Subtask #7:

score: 10
Accepted

Test #22:

score: 10
Accepted
time: 384ms
memory: 82320kb

input:

5000 736097577 890228464
1825247 1825246
4650840 4650840
2234311 2234312
7343146 7343145
3787634 3787634
2656735 2656734
1463014 1463013
3322493 3322494
8952134 8952133
9554797 9554798
9938426 9938425
7324212 7324212
9852188 9852188
4135136 4135135
2970038 2970037
216167 216166
5330601 5330602
72371...

output:

60773436

result:

ok single line: '60773436'

Test #23:

score: 10
Accepted
time: 362ms
memory: 82368kb

input:

4999 71938875 980975552
9165546 9165547
6658015 6658014
715219 715219
2770358 2770357
6724087 6724088
190936 190937
762142 762143
7697875 7697876
2560417 2560416
244298 244297
5390425 5390425
2948144 2948144
5979604 5979605
7544060 7544060
7640731 7640731
9811715 9811715
8451395 8451396
3957616 3957...

output:

553974017

result:

ok single line: '553974017'

Test #24:

score: 10
Accepted
time: 362ms
memory: 82340kb

input:

5000 718317306 176345776
9998853 9998852
9997215 9997216
9998526 9998526
9997709 9997708
9995955 9995955
9995446 9995447
9997855 9997855
9995342 9995342
9999947 9999946
9997976 9997976
9999200 9999199
9998210 9998211
9998941 9998941
9996613 9996613
9996078 9996077
9995751 9995752
9999173 9999172
999...

output:

947034016

result:

ok single line: '947034016'

Subtask #8:

score: 10
Accepted

Test #25:

score: 10
Accepted
time: 674ms
memory: 82756kb

input:

5000 118468585 976109781
377801 381122
359413 364103
226131 224910
163598 165233
16964 20842
113098 111221
129456 130508
478339 478755
182926 179190
143979 142184
388264 390144
365026 366013
16759 19223
359155 361291
62049 57288
66890 63415
425143 423399
382820 384122
488899 485326
218034 220421
554...

output:

765155089

result:

ok single line: '765155089'

Test #26:

score: 10
Accepted
time: 679ms
memory: 82860kb

input:

5000 318403831 839467175
11640 12131
241627 245881
473681 472975
391576 393514
31008 29919
253292 253861
13743 14879
444439 443985
301324 296338
109725 112305
397542 393290
254239 250431
218854 215467
212552 215315
408132 404569
399114 402831
459405 454659
113064 113944
420993 419018
271106 271633
2...

output:

463824425

result:

ok single line: '463824425'

Test #27:

score: 10
Accepted
time: 716ms
memory: 82836kb

input:

5000 346411387 765003448
494482 489667
494783 490089
490673 489761
493405 494494
493842 491474
490095 491899
490388 491500
491221 492060
490364 490742
490092 494147
492579 491588
492700 489934
490197 486239
492817 490750
493257 489086
490952 488948
491845 496097
494601 491696
490453 495023
492373 48...

output:

857190781

result:

ok single line: '857190781'

Test #28:

score: 10
Accepted
time: 992ms
memory: 82440kb

input:

4989 943889316 836700873
465172 470172
429549 434541
476512 481503
417168 422162
405726 410719
443228 448225
483153 488147
492043 497039
442568 447559
414442 419433
455962 460960
393819 398819
471062 476053
481376 486367
431477 436468
455053 460051
393983 398975
439347 444344
481313 486312
406288 41...

output:

517146326

result:

ok single line: '517146326'

Subtask #9:

score: 25
Accepted

Test #29:

score: 25
Accepted
time: 565ms
memory: 82716kb

input:

3000 177229351 510136745
179259 179695
2298716 2302777
4922758 4926164
3300268 3302823
1818638 1817659
4429564 4426586
3915685 3911287
2997695 2999804
459298 460850
52829 57660
4442042 4438650
1148083 1150580
4093935 4089443
2032081 2031185
1910400 1912395
3852021 3853590
1073219 1068243
1986701 198...

output:

703321479

result:

ok single line: '703321479'

Test #30:

score: 25
Accepted
time: 574ms
memory: 82788kb

input:

3000 476290001 46921003
4716240 4717964
593971 598957
2752633 2757236
213755 215594
1732366 1730300
4431750 4430807
4007441 4005985
4901525 4898206
1513213 1508491
1038789 1035443
4907926 4912724
298399 294260
1276398 1280961
226901 222786
4132693 4134047
2316299 2314196
1136420 1137208
4582768 4580...

output:

199407622

result:

ok single line: '199407622'

Test #31:

score: 25
Accepted
time: 552ms
memory: 82600kb

input:

3000 882441844 215013969
4994972 4995062
4990360 4985374
4990852 4995608
4990664 4992783
4993648 4997919
4994580 4995062
4994001 4997448
4993871 4997675
4990032 4989254
4993509 4992996
4994963 4998664
4994211 4991485
4991714 4995264
4990341 4987921
4990127 4993000
4993493 4993804
4994643 4990689
499...

output:

605292444

result:

ok single line: '605292444'

Test #32:

score: 25
Accepted
time: 716ms
memory: 82440kb

input:

3000 114625565 174197321
4024607 4029602
4768716 4773714
4476939 4481939
4692513 4697510
4147356 4152354
4494915 4499912
4109251 4114247
4667211 4672210
4498988 4503986
4158606 4163599
4754927 4759920
4009523 4014517
4609092 4614090
4068118 4073112
4118491 4123484
4899578 4904573
4253238 4258235
495...

output:

522506392

result:

ok single line: '522506392'

Subtask #10:

score: 15
Accepted

Test #33:

score: 15
Accepted
time: 685ms
memory: 82888kb

input:

5000 73170491 768796521
670558 670089
2958025 2960803
5414101 5416526
4699271 4699813
4561016 4565915
7035233 7030323
1378672 1378584
4964463 4966800
7242131 7240789
8247079 8245607
9279015 9283822
6727462 6723335
438898 443570
8300373 8299256
6811203 6810475
3356946 3358886
3697156 3698634
2948112 ...

output:

853071134

result:

ok single line: '853071134'

Test #34:

score: 15
Accepted
time: 675ms
memory: 82836kb

input:

5000 441921899 511450796
9599946 9597637
4813713 4810412
1007109 1010021
2932681 2932795
1159729 1163798
4662316 4665672
7178825 7176276
6089201 6088643
6696970 6698275
5785177 5783160
2246661 2242610
1523531 1525909
4243736 4248001
5701117 5703406
7434046 7434312
2095811 2099330
8099951 8102141
557...

output:

654923609

result:

ok single line: '654923609'

Test #35:

score: 15
Accepted
time: 679ms
memory: 82768kb

input:

5000 436696348 788221715
9994570 9990827
9993418 9994242
9994147 9999095
9991336 9989159
9991702 9994928
9990217 9991242
9993662 9994415
9992765 9989668
9992924 9994489
9990026 9993790
9992592 9988696
9993612 9991127
9994206 9991006
9993154 9995697
9994950 9994284
9994269 9997416
9990514 9992541
999...

output:

361059499

result:

ok single line: '361059499'

Test #36:

score: 15
Accepted
time: 1013ms
memory: 82496kb

input:

5000 754046648 477528281
9227841 9232836
9854988 9859979
9400682 9405680
9734955 9739947
9928206 9933199
9042774 9047774
9627526 9632520
9417300 9422298
9177357 9182354
9087469 9092461
9133068 9138068
9648078 9653078
9781071 9786066
9464854 9469854
9326095 9331094
9362908 9367899
9446350 9451347
918...

output:

925208874

result:

ok single line: '925208874'