QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#232989#7561. Digit DPchenchiAC ✓2039ms415260kbC++205.6kb2023-10-31 08:48:402023-10-31 08:48:41

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 15ms
memory: 399648kb

input:

3 3
1 2 4
2 000 111
1 010 101 1
2 000 111

output:

1960
3040

result:

ok 2 number(s): "1960 3040"

Test #2:

score: 0
Accepted
time: 19ms
memory: 399156kb

input:

2 2
1 1
2 00 10
2 00 11

output:

0
2

result:

ok 2 number(s): "0 2"

Test #3:

score: 0
Accepted
time: 1959ms
memory: 405548kb

input:

99 49952
470888 74578 802746 396295 386884 721198 628655 722503 207868 647942 87506 792718 761498 917727 843338 908043 952768 268783 375312 414369 319712 96230 277106 168102 263554 936674 246545 667941 198849 268921 191459 436316 134606 802932 515506 837311 465964 394766 17626 650419 984050 790137 4...

output:

413449847
513027341
379532803
828185770
758023792
955841012
501590435
193833160
52015005
225646848
79278417
702315659
500712121
309545833
425668668
376205546
751940860
216608361
71293362
894788412
240680508
127400767
584610664
427310971
447134022
992309654
109125715
611523032
601028580
647705121
222...

result:

ok 24939 numbers

Test #4:

score: 0
Accepted
time: 1974ms
memory: 403432kb

input:

99 49996
475634 928248 927808 875072 158867 937890 595515 26685 468307 240390 887597 586447 764525 365644 156469 188306 350786 308832 695957 562147 427221 937909 590963 478310 357775 361535 993561 967811 718075 555000 533750 412453 936715 173340 350235 67386 20497 895277 233727 235830 182535 324591 ...

output:

259953307
262069796
924406695
26478563
298108385
704809872
792095151
692313907
142605670
903738194
553847857
38647574
43984176
29033158
867129569
773316503
446446137
689917105
416630991
420951134
458731790
810982529
271786324
784672540
32086643
884115047
362416513
759279937
954942112
657139797
84271...

result:

ok 24966 numbers

Test #5:

score: 0
Accepted
time: 1920ms
memory: 405968kb

input:

97 49937
288891 590429 244358 321145 930851 89174 529670 363571 728747 543238 720391 188689 702144 813561 628383 660056 781508 605777 759705 485733 534730 812292 937524 788519 451996 10588 483682 267682 461493 65270 619145 355885 963015 800644 217669 264757 640439 685387 674020 853944 91420 891750 5...

output:

965092014
894220805
25147419
773946359
121175554
920857234
690801029
201407028
945021685
635573900
216040077
104774110
355850561
561273301
926775110
372974907
597614504
942178785
379372329
754110414
735461091
710022471
323330013
717895783
482511705
946821704
625188740
299932888
895004295
367564320
5...

result:

ok 25768 numbers

Test #6:

score: 0
Accepted
time: 1932ms
memory: 415260kb

input:

96 49981
102149 219907 593611 24114 959730 305867 496529 635050 21890 102981 487777 982418 896659 518374 876106 907614 179526 645826 856158 633510 642240 653971 475573 98727 513513 435449 165290 567552 980720 351348 994140 332021 797828 138348 52399 751728 227676 475498 922825 215163 289905 426204 7...

output:

274224174
634217068
813069780
582646554
692811965
500277373
820650745
249911179
910599837
79752646
454211240
542480599
531528915
576664734
417008251
248368338
924557955
675037065
933004411
320044817
134377085
177982136
923478201
167853704
738499226
732464690
723323846
661464097
823371891
129173478
1...

result:

ok 24458 numbers

Test #7:

score: 0
Accepted
time: 1947ms
memory: 401560kb

input:

99 49921
106895 882089 718673 502890 699009 489855 430685 939232 282330 630021 287868 584659 866982 966291 348020 379364 642952 942770 919906 781288 492853 752547 789430 217447 607734 893014 655411 867422 467242 828915 303728 275454 599937 732948 887129 981803 814914 8713 363118 833277 488390 960658...

output:

571914589
935084376
827788412
707727385
222848822
789988142
130081973
890052791
21823459
198217451
775618413
943091375
261240034
711259481
243909220
167600347
186737627
526251657
226935286
979557550
784330590
857111244
108590275
746670632
67900274
551981921
855980494
246942307
634439271
823459341
35...

result:

ok 24928 numbers

Test #8:

score: 0
Accepted
time: 1970ms
memory: 403200kb

input:

99 49970
887448 703054 67926 981667 695184 641139 364840 276118 318577 222469 896470 378388 28793 414208 595743 659626 40970 207011 207847 704874 600362 594226 168695 527655 701955 509363 369723 134588 210660 147697 613315 251590 434750 103356 721858 179173 402151 798823 546514 451392 654171 752009 ...

output:

994539861
230160518
831071911
658104212
646333204
48758132
438924579
479652249
500155431
388305435
61288261
662022245
836922136
428322715
754372301
55811268
812913663
248594306
932725310
243841330
342441725
888780076
877471721
958979518
295016896
997768920
253078043
484841714
578699274
988896609
841...

result:

ok 24970 numbers

Test #9:

score: 0
Accepted
time: 1909ms
memory: 407628kb

input:

97 49922
924898 332532 192988 684636 499872 857831 331700 547597 579017 525316 696560 204822 31820 862125 908873 131377 438988 312468 271596 852652 740575 501313 482552 837864 796176 934224 84035 210267 729886 657968 731414 195022 461051 697957 589292 409248 989389 523526 19511 812610 595760 286463 ...

output:

670642273
100974501
625973766
105095407
972918641
230643745
884360909
863808877
784806784
361515233
226518536
681307050
91526349
382996995
458256474
766680719
175217744
990501348
775220693
121647158
443490504
964608278
366850818
295051421
82689337
499548119
737432899
477101352
878525064
366413071
84...

result:

ok 25732 numbers

Test #10:

score: 0
Accepted
time: 2039ms
memory: 413744kb

input:

100 49963
705451 994713 509537 130709 463343 41819 265855 851779 839457 85060 496650 774359 193631 310042 380788 411639 869710 576709 368048 33133 623893 375696 796409 923880 114590 391789 574156 510137 249112 135534 41001 171159 263159 35661 391318 639323 576627 89445 235612 430725 794245 820918 89...

output:

915810899
506294427
47800009
103639896
956906949
548330581
732270643
752575162
498382746
898706792
533368210
715772880
170169296
821669776
366622196
930058524
422553215
727535836
456033290
178329746
702822832
431557772
991450571
994720884
841765419
749599756
642382643
578076375
621922898
29723350
43...

result:

ok 25238 numbers

Test #11:

score: 0
Accepted
time: 1984ms
memory: 404416kb

input:

99 49907
710197 624191 858791 609486 268030 225807 200011 188665 132600 612100 329445 633496 196658 757959 628510 883389 267729 840950 655989 180911 731402 217375 142970 299496 208811 8138 288468 810007 992530 421612 383292 81887 97972 662965 258752 836694 196568 846851 675905 791943 960026 388076 5...

output:

26550913
37967518
866129092
449447729
784627573
957609030
223734858
109702716
706620813
908609246
200088075
65731593
746451302
791934803
545413883
279170991
984659992
16766707
572424663
67271436
659220473
679665329
511747582
303939869
586840465
557851982
314773019
661277669
671563584
157595593
66252...

result:

ok 24947 numbers

Test #12:

score: 0
Accepted
time: 1953ms
memory: 410092kb

input:

98 49918
274071 359971 550121 204862 843967 173607 619138 690754 219513 171337 183499 549873 542337 661387 397647 495917 413076 918417 868000 422012 195703 305826 526356 334728 535984 133227 226371 632864 493387 611196 258251 576565 244054 713672 267148 679390 700005 67050 546349 2772 999375 951131 ...

output:

64412198
438330476
544087922
183377287
218050658
63409640
622983373
792175595
56162202
109909817
597953619
475435831
503222938
971092944
703746139
370972476
721890059
256607366
980618411
389408168
185601217
807652101
254330391
642979159
235228431
627504981
383641079
760270951
463228607
300744777
826...

result:

ok 25130 numbers