QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#883781 | #2010. Emiya 家今天的饭 | ZhangYiDe | 100 ✓ | 240ms | 7120kb | C++20 | 959b | 2025-02-05 18:50:58 | 2025-02-05 18:50:59 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Pretests
Final Tests
Test #1:
score: 4
Accepted
time: 0ms
memory: 3840kb
input:
2 2 1 1 1 1
output:
2
result:
ok 1 number(s): "2"
Test #2:
score: 4
Accepted
time: 0ms
memory: 5840kb
input:
2 3 1 1 1 1 0 1
output:
4
result:
ok 1 number(s): "4"
Test #3:
score: 4
Accepted
time: 0ms
memory: 5708kb
input:
5 2 1 1 1 0 1 1 1 1 1 1
output:
34
result:
ok 1 number(s): "34"
Test #4:
score: 4
Accepted
time: 0ms
memory: 5836kb
input:
5 3 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1
output:
358
result:
ok 1 number(s): "358"
Test #5:
score: 4
Accepted
time: 1ms
memory: 5712kb
input:
10 2 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1
output:
1372
result:
ok 1 number(s): "1372"
Test #6:
score: 4
Accepted
time: 0ms
memory: 3840kb
input:
10 3 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 1 1 0 1 1 1 0 1 1 0 1
output:
22211
result:
ok 1 number(s): "22211"
Test #7:
score: 4
Accepted
time: 1ms
memory: 3840kb
input:
10 2 470 495 570 77 871 183 513 511 425 250 7 432 132 782 256 487 641 73 914 775
output:
780126716
result:
ok 1 number(s): "780126716"
Test #8:
score: 4
Accepted
time: 0ms
memory: 3840kb
input:
10 3 538 604 92 820 608 23 652 172 261 609 153 740 190 464 751 117 726 307 895 785 702 111 967 268 629 331 404 10 693 946
output:
342232854
result:
ok 1 number(s): "342232854"
Test #9:
score: 4
Accepted
time: 0ms
memory: 5968kb
input:
40 2 487 641 73 914 775 246 808 99 282 580 620 782 167 690 474 796 808 783 392 519 834 5 972 1 467 628 752 843 772 709 319 791 686 399 14 85 875 979 33 199 753 387 333 264 955 582 830 145 42 690 398 745 705 961 447 431 827 192 241 105 429 607 803 479 136 998 432 551 819 619 161 209 965 989 857 634 8...
output:
951514275
result:
ok 1 number(s): "951514275"
Test #10:
score: 4
Accepted
time: 0ms
memory: 5964kb
input:
40 2 538 414 648 613 57 9 287 508 552 559 960 212 715 552 708 893 302 375 906 362 979 541 897 426 894 284 813 232 75 304 509 830 441 857 936 150 429 924 484 224 175 232 394 355 698 957 304 761 736 835 773 331 773 273 798 732 749 152 429 61 262 724 292 408 39 797 69 112 928 939 977 283 988 357 39 30 ...
output:
502934077
result:
ok 1 number(s): "502934077"
Test #11:
score: 4
Accepted
time: 1ms
memory: 4096kb
input:
40 2 595 625 8 446 113 882 348 337 342 655 544 368 643 635 128 757 213 456 495 876 964 997 359 191 869 541 543 75 72 234 696 57 155 322 766 745 501 625 563 49 798 943 340 720 511 746 727 52 116 373 413 451 955 518 27 696 252 359 888 99 776 798 96 482 713 484 67 392 146 286 572 448 165 865 335 196 29...
output:
153558069
result:
ok 1 number(s): "153558069"
Test #12:
score: 4
Accepted
time: 0ms
memory: 5964kb
input:
40 2 596 510 719 843 211 572 801 826 602 261 873 470 646 518 27 730 784 959 902 970 252 177 91 87 270 624 703 319 639 720 661 129 235 788 930 993 5 723 53 725 351 306 578 890 852 370 509 151 723 919 497 323 571 437 305 787 294 550 757 185 50 59 893 342 988 365 719 731 183 401 369 336 319 631 69 878 ...
output:
808436941
result:
ok 1 number(s): "808436941"
Test #13:
score: 4
Accepted
time: 1ms
memory: 4096kb
input:
40 3 117 726 307 895 785 702 111 967 268 629 331 404 10 693 946 57 85 272 697 911 862 290 200 255 677 439 410 919 629 989 857 126 574 78 14 593 186 592 980 596 571 249 326 849 325 275 372 868 640 409 519 17 724 835 904 200 915 904 456 941 687 611 752 198 913 534 743 137 257 266 403 733 401 950 447 3...
output:
383401757
result:
ok 1 number(s): "383401757"
Test #14:
score: 4
Accepted
time: 0ms
memory: 5960kb
input:
40 3 232 394 355 698 957 304 761 736 835 773 331 773 273 798 732 749 152 429 61 262 724 292 408 39 797 69 112 928 939 977 283 988 357 39 30 923 709 175 532 200 124 650 951 460 792 915 651 352 198 618 533 174 692 808 403 297 22 602 917 960 595 625 8 446 113 882 348 337 342 655 544 368 643 635 128 757...
output:
876960614
result:
ok 1 number(s): "876960614"
Test #15:
score: 4
Accepted
time: 0ms
memory: 5964kb
input:
40 3 112 441 594 869 723 664 464 507 646 496 256 114 53 580 350 538 644 694 130 102 607 240 821 724 802 712 549 290 523 835 258 79 153 884 825 623 336 599 450 113 542 798 395 437 92 887 485 740 836 410 802 541 480 784 110 926 562 192 906 67 740 798 16 961 611 609 243 391 291 5 9 149 398 368 809 752 ...
output:
607396887
result:
ok 1 number(s): "607396887"
Test #16:
score: 4
Accepted
time: 0ms
memory: 5964kb
input:
40 3 72 294 71 147 783 326 970 616 808 85 370 302 920 327 363 54 568 72 634 140 248 87 907 969 80 54 294 778 991 691 531 573 580 579 312 470 474 873 395 191 640 22 88 28 610 177 206 432 843 447 531 202 962 129 111 673 405 564 687 59 15 925 82 359 464 664 564 135 391 723 680 740 931 161 249 659 906 2...
output:
919724636
result:
ok 1 number(s): "919724636"
Test #17:
score: 4
Accepted
time: 12ms
memory: 5960kb
input:
40 500 52 116 373 413 451 955 518 27 696 252 359 888 99 776 798 96 482 713 484 67 392 146 286 572 448 165 865 335 196 297 614 724 740 45 658 352 487 799 864 947 643 312 909 959 404 233 488 953 233 645 463 331 238 564 596 510 719 843 211 572 801 826 602 261 873 470 646 518 27 730 784 959 902 970 252 ...
output:
69641733
result:
ok 1 number(s): "69641733"
Test #18:
score: 4
Accepted
time: 12ms
memory: 6096kb
input:
40 500 360 62 703 876 60 896 572 289 805 201 654 742 574 380 492 915 301 377 467 484 991 98 985 538 910 741 486 406 69 179 419 997 167 819 820 296 332 79 877 556 452 743 874 190 423 89 302 304 652 591 522 732 473 11 916 177 702 146 909 752 800 916 118 668 792 338 338 303 368 201 72 748 490 838 326 8...
output:
572832160
result:
ok 1 number(s): "572832160"
Test #19:
score: 4
Accepted
time: 10ms
memory: 5712kb
input:
40 500 81 598 214 492 170 225 145 824 830 143 163 710 864 281 93 338 488 469 608 110 238 29 537 761 338 733 862 890 160 140 702 267 806 636 185 777 177 999 11 825 151 985 138 836 239 37 588 618 176 648 744 232 583 379 126 430 898 387 90 820 430 13 650 252 630 538 677 783 393 340 757 597 632 531 46 7...
output:
772057043
result:
ok 1 number(s): "772057043"
Test #20:
score: 4
Accepted
time: 12ms
memory: 4480kb
input:
40 500 336 548 143 776 76 916 710 442 250 579 603 407 76 973 492 882 617 368 354 816 977 796 225 144 212 762 170 12 857 257 312 568 408 433 176 33 334 936 771 874 292 190 998 195 673 594 391 402 548 49 182 326 359 914 830 601 265 328 223 508 775 330 457 100 664 825 424 848 156 754 134 205 82 757 247...
output:
73864683
result:
ok 1 number(s): "73864683"
Test #21:
score: 4
Accepted
time: 12ms
memory: 4352kb
input:
40 500 330 863 277 27 759 486 461 32 526 332 282 933 467 745 800 451 498 787 678 399 6 691 868 531 449 26 776 4 779 876 923 510 736 997 855 690 673 328 240 30 212 123 857 423 812 663 74 604 823 103 484 635 270 49 663 550 625 55 640 566 225 244 755 988 288 743 588 673 829 368 33 207 688 883 836 581 6...
output:
293354841
result:
ok 1 number(s): "293354841"
Test #22:
score: 4
Accepted
time: 212ms
memory: 7040kb
input:
100 2000 210 842 651 837 310 306 379 70 812 254 470 986 716 758 877 810 479 2 37 95 420 553 294 104 258 922 616 497 332 633 401 686 446 850 624 21 794 939 685 193 889 120 215 484 359 147 752 480 362 872 18 222 603 644 340 326 145 734 550 298 919 412 214 707 317 106 607 284 586 946 862 506 206 367 94...
output:
921457984
result:
ok 1 number(s): "921457984"
Test #23:
score: 4
Accepted
time: 240ms
memory: 7040kb
input:
100 2000 262384517 408485232 462647781 418679432 650998123 641852238 922256756 641803137 509515608 81911612 216952764 594990172 195170086 902859730 901124378 62881499 577727300 443841838 784271012 313767915 196458666 478814643 693351401 515102364 310719973 580061552 565213317 669649059 223534425 257...
output:
894728423
result:
ok 1 number(s): "894728423"
Test #24:
score: 4
Accepted
time: 239ms
memory: 7120kb
input:
100 2000 262384517 408485232 462647781 418679432 650998123 641852238 922256756 641803137 509515608 81911612 216952764 594990172 195170086 902859730 901124378 62881499 577727300 443841838 784271012 313767915 196458666 478814643 693351401 515102364 310719973 580061552 565213317 669649059 223534425 257...
output:
894728423
result:
ok 1 number(s): "894728423"
Test #25:
score: 4
Accepted
time: 240ms
memory: 7116kb
input:
100 2000 56990606 120764782 987023244 156836157 842608604 208464159 567237759 712237317 913798582 781534601 449944653 140059690 106902922 251828587 330680294 613907046 455654416 968071889 531130851 403636053 246146895 880741803 88596394 950460714 252189626 616038853 916670207 741854983 178214614 911...
output:
324904243
result:
ok 1 number(s): "324904243"