QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#466116#7221. The Road NetworkGuanYunchangAC ✓22ms19416kbC++172.8kb2024-07-07 16:06:282024-07-07 16:06:30

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3656kb

input:

4 7
1 4 6 3

output:

3 6

result:

ok 2 number(s): "3 6"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

4 11
1 4 6 3

output:

0 16

result:

ok 2 number(s): "0 16"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

4 5
1 4 6 3

output:

4 2

result:

ok 2 number(s): "4 2"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

10 0
0 0 2 8 7 0 0 9 0 2

output:

25 252

result:

ok 2 number(s): "25 252"

Test #5:

score: 0
Accepted
time: 1ms
memory: 3680kb

input:

10 10
2 7 3 3 4 7 6 8 2 1

output:

14 4

result:

ok 2 number(s): "14 4"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3672kb

input:

10 10
3 1 1 3 7 0 6 10 1 8

output:

13 2

result:

ok 2 number(s): "13 2"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3756kb

input:

10 100
65 51 79 36 2 47 92 30 25 94

output:

18 8

result:

ok 2 number(s): "18 8"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

10 100
59 23 34 85 86 83 80 59 49 92

output:

25 2

result:

ok 2 number(s): "25 2"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

10 64
17 29 58 43 58 28 35 32 84 68

output:

24 4

result:

ok 2 number(s): "24 4"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

10 570
491 0 917 880 817 574 687 271 903 299

output:

25 12

result:

ok 2 number(s): "25 12"

Test #11:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

10 777
265 15 532 621 674 970 487 852 245 705

output:

22 22

result:

ok 2 number(s): "22 22"

Test #12:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

10 1000
30 651 139 594 912 125 908 441 589 722

output:

16 60

result:

ok 2 number(s): "16 60"

Test #13:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

10 100000
20324 80646 41078 4312 99749 91381 17558 72304 34167 97507

output:

21 2

result:

ok 2 number(s): "21 2"

Test #14:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

10 25965
48515 58580 22596 21971 1958 461 3994 44268 2654 12852

output:

21 6

result:

ok 2 number(s): "21 6"

Test #15:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

10 100000
87599 60861 68874 90937 4169 60849 90431 40578 71143 87785

output:

20 504

result:

ok 2 number(s): "20 504"

Test #16:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

10 500000000
416597451 444080196 476404630 331629074 437148184 48965137 213850399 412531610 64886804 460736205

output:

22 2

result:

ok 2 number(s): "22 2"

Test #17:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

10 500000000
123639683 346161103 249546242 439299419 497828609 120785562 393541902 208320182 480084424 302413299

output:

24 2

result:

ok 2 number(s): "24 2"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

10 500000000
125649203 248242009 317655142 343970706 58509033 100637758 278266116 414174180 395282044 52122165

output:

12 32

result:

ok 2 number(s): "12 32"

Test #19:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

10 702707240
911690470 175733148 56419428 571168608 738900064 336169888 480225097 467294240 526974092 487860083

output:

22 2

result:

ok 2 number(s): "22 2"

Test #20:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

10 1000000000
417518764 104085429 609689921 815038655 245477095 409118727 778061033 949273639 144364084 776426030

output:

18 2

result:

ok 2 number(s): "18 2"

Test #21:

score: 0
Accepted
time: 1ms
memory: 5664kb

input:

10 865525474
964816257 32437710 457927705 353875992 678425200 187100274 412333457 357624109 393157857 138620904

output:

14 2

result:

ok 2 number(s): "14 2"

Test #22:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

20 6
0 2 4 10 5 6 3 5 4 9 0 5 0 5 1 0 1 1 8 0

output:

76 10

result:

ok 2 number(s): "76 10"

Test #23:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

20 10
2 7 9 6 7 2 9 7 9 1 9 7 4 4 8 10 3 7 9 10

output:

95 12

result:

ok 2 number(s): "95 12"

Test #24:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

20 10
0 7 10 2 1 2 6 9 8 4 1 7 5 3 9 1 9 3 7 4

output:

72 6

result:

ok 2 number(s): "72 6"

Test #25:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

20 25
75 73 66 21 14 65 83 21 58 4 2 33 45 65 2 55 100 97 40 31

output:

100 2002

result:

ok 2 number(s): "100 2002"

Test #26:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

20 49
0 13 90 69 30 0 39 84 49 71 76 8 85 12 46 20 30 78 25 19

output:

97 2

result:

ok 2 number(s): "97 2"

Test #27:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

20 97
38 97 13 17 2 46 95 56 84 36 27 40 69 92 1 97 28 25 20 72

output:

74 4

result:

ok 2 number(s): "74 4"

Test #28:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

20 907
681 764 47 754 775 732 894 649 833 642 725 74 12 558 98 97 534 731 232 126

output:

58 88

result:

ok 2 number(s): "58 88"

Test #29:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

20 371
828 788 282 726 251 126 314 230 795 39 245 302 682 738 114 484 52 865 394 614

output:

100 2

result:

ok 2 number(s): "100 2"

Test #30:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

20 1000
221 803 890 467 489 291 734 430 519 445 154 141 352 544 758 490 810 990 796 110

output:

74 2

result:

ok 2 number(s): "74 2"

Test #31:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

20 53435
60667 3099 44211 22195 45013 5110 31012 14770 49917 10314 26229 74517 15452 37054 93668 69365 37983 14686 62760 97627

output:

94 2

result:

ok 2 number(s): "94 2"

Test #32:

score: 0
Accepted
time: 1ms
memory: 5736kb

input:

20 100000
99751 81034 25730 15507 47224 89845 93101 86735 29299 25660 68016 88068 31149 61435 52512 94396 2046 75878 1187 64252

output:

80 2

result:

ok 2 number(s): "80 2"

Test #33:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

20 86167
27941 58968 72008 8819 49434 74580 14777 83045 97787 76246 74561 66378 11606 45403 87010 79013 25698 1827 80028 30878

output:

87 4

result:

ok 2 number(s): "87 4"

Test #34:

score: 0
Accepted
time: 0ms
memory: 3740kb

input:

20 297095690
427123861 193805074 284892492 12203198 142584093 477793343 303221033 273402447 412050932 441386148 129076913 254469495 99239611 269488414 225296967 444233109 179484225 460008728 269174021 76941541

output:

98 30

result:

ok 2 number(s): "98 30"

Test #35:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

20 439053522
21101609 300918694 58034104 119873544 203264518 49613767 187945247 366191961 122215838 78030529 181151235 224326356 22109628 30975415 14831949 135442268 181792636 219326511 180380121 361022993

output:

29 128

result:

ok 2 number(s): "29 128"

Test #36:

score: 0
Accepted
time: 0ms
memory: 5668kb

input:

20 222986589
228143841 294967830 423143946 319512118 263944944 234498676 277702174 72045958 334414399 327739396 323160131 307247701 353011417 405526901 214432357 8554232 71036564 478644295 296618935 258168929

output:

100 38896

result:

ok 2 number(s): "100 38896"

Test #37:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

20 814916070
336405873 965255840 652652222 713068201 61495714 864495608 289278684 273789489 705069803 645861692 283828514 807458721 135671792 915838066 347383048 781174151 27017020 165786268 525637386 825246400

output:

91 4

result:

ok 2 number(s): "91 4"

Test #38:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

20 1000000000
252299584 188575412 500890006 956938247 568072747 568848227 587114620 755768888 617427087 934427639 834979913 346516263 3441700 707340534 135002005 965711294 928983573 745563964 871761848 196491818

output:

80 12

result:

ok 2 number(s): "80 12"

Test #39:

score: 0
Accepted
time: 1ms
memory: 5596kb

input:

20 630547200
94564367 821960402 54160499 495775584 369617070 346829774 884950557 164119358 571253568 222993586 722567801 549137317 871211609 130246782 554024742 518844655 535982833 30374368 627951726 862704529

output:

93 8

result:

ok 2 number(s): "93 8"

Test #40:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

50 2
10 4 2 7 5 10 7 6 1 10 6 2 7 9 2 5 10 6 5 2 2 6 5 2 4 1 10 9 4 2 0 4 7 9 3 10 5 10 3 6 5 0 0 4 2 0 2 10 5 3

output:

625 662940393

result:

ok 2 number(s): "625 662940393"

Test #41:

score: 0
Accepted
time: 1ms
memory: 5744kb

input:

50 7
9 4 0 6 10 10 3 4 10 3 8 3 4 8 5 7 8 1 6 3 3 9 3 5 5 4 4 10 5 9 2 3 8 10 6 6 10 10 7 5 1 7 6 5 0 2 7 8 1 3

output:

614 2

result:

ok 2 number(s): "614 2"

Test #42:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

50 10
6 9 5 2 0 10 2 6 5 6 10 3 4 3 10 6 3 8 7 5 8 8 1 4 10 0 2 4 3 5 5 6 8 0 5 9 3 6 8 4 4 3 1 1 2 4 8 3 6 7

output:

448 112

result:

ok 2 number(s): "448 112"

Test #43:

score: 0
Accepted
time: 0ms
memory: 5652kb

input:

50 100
80 75 88 21 3 16 93 96 46 96 62 94 83 73 35 29 19 73 7 21 95 60 57 67 11 16 99 72 28 58 11 56 3 58 82 5 15 24 94 30 24 78 1 97 15 28 40 99 8 59

output:

428 20

result:

ok 2 number(s): "428 20"

Test #44:

score: 0
Accepted
time: 1ms
memory: 5752kb

input:

50 73
84 59 11 70 8 52 48 57 13 62 35 58 66 53 91 5 50 99 92 41 41 1 1 63 19 25 31 72 3 65 71 10 50 47 34 30 66 6 52 83 80 70 41 23 16 35 2 3 2 29

output:

487 2

result:

ok 2 number(s): "487 2"

Test #45:

score: 0
Accepted
time: 0ms
memory: 3924kb

input:

50 100
10 99 34 18 92 98 3 30 4 38 43 22 39 0 34 70 48 13 55 61 20 44 82 26 92 46 43 40 23 7 74 65 51 25 98 34 59 79 10 3 79 96 81 72 38 31 98 76 98 89

output:

446 4

result:

ok 2 number(s): "446 4"

Test #46:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

50 410
624 832 678 853 879 219 397 5 226 290 256 74 804 724 61 389 100 167 925 881 990 994 881 918 566 351 802 975 254 419 624 3 449 904 374 309 664 118 510 87 642 42 813 407 567 557 670 471 72 426

output:

625 285012

result:

ok 2 number(s): "625 285012"

Test #47:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

50 722
771 848 285 586 116 614 198 968 959 688 538 294 465 522 698 156 238 674 707 377 868 677 44 395 833 642 37 994 236 623 88 675 72 74 105 489 370 162 618 200 297 795 220 926 569 800 368 336 810 549

output:

583 6

result:

ok 2 number(s): "583 6"

Test #48:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

50 936
544 872 901 947 593 390 618 548 921 466 66 522 135 710 341 162 375 807 116 865 365 121 971 254 488 322 892 641 829 207 553 718 84 619 218 670 703 833 735 702 334 556 866 437 571 423 57 200 547 425

output:

493 10

result:

ok 2 number(s): "493 10"

Test #49:

score: 0
Accepted
time: 0ms
memory: 3864kb

input:

50 93211
3480 21766 53612 21981 10326 27676 57919 71689 5502 64804 10055 71473 87620 26066 34856 80227 96389 22190 73313 26703 53120 54516 38141 44915 692 92608 62451 72609 52987 94032 12122 9385 81515 91654 91136 69902 39802 30760 58484 19076 94870 76341 14031 16816 63163 44946 88009 79551 19570 49...

output:

467 2

result:

ok 2 number(s): "467 2"

Test #50:

score: 0
Accepted
time: 1ms
memory: 5740kb

input:

50 100000
7323 99701 99891 90947 12537 36757 44354 3240 73990 4496 16600 85024 27663 10034 93701 5257 95693 48140 52153 93329 25017 28566 7698 43327 75516 86827 29364 50751 40383 47909 78874 82568 23863 94835 45422 79166 38391 63796 49148 91756 53149 28979 64105 76779 84248 22717 59516 44531 12539 9...

output:

473 2

result:

ok 2 number(s): "473 2"

Test #51:

score: 0
Accepted
time: 1ms
memory: 5816kb

input:

50 100000
46408 66741 57062 8605 49988 97146 41684 75204 18131 55082 58386 98575 67708 34415 52545 54635 19344 74091 30993 84301 96915 78271 17668 30845 61232 5391 31519 18000 52126 26132 56518 15337 1452 81950 40120 12777 50433 7724 50706 88783 71015 57272 78939 36741 45746 87036 41916 44752 89442 ...

output:

409 2

result:

ok 2 number(s): "409 2"

Test #52:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

50 500000000
345638607 355078790 325454217 143860149 258891823 469310673 389430130 452050497 227414343 247141584 333161566 389026598 324582427 175946523 269583516 314179243 45872818 234517271 199348822 383747686 496749548 207327572 88887338 409569572 347211995 282639880 392360928 433825950 477837954...

output:

485 30

result:

ok 2 number(s): "485 30"

Test #53:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

50 500000000
347648126 54160638 98595829 456563207 319572248 449162869 274154344 452871782 347644675 496850450 180203175 266915230 360516928 142466237 469183924 300355691 48181229 493835055 110554923 75860908 261407934 250997810 420515051 487627600 310952013 247891337 327940667 117981071 220122181 4...

output:

526 6

result:

ok 2 number(s): "526 6"

Test #54:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

50 500000000
351691300 456241546 463705671 64233552 380252673 20983293 158878558 250694008 57809582 133494832 27244784 144803862 283386944 311985010 258718906 83533079 142457870 140088354 134825508 267974132 231099034 386636278 344110991 452621145 479724745 213142795 60521348 7168905 167439120 29998...

output:

433 6

result:

ok 2 number(s): "433 6"

Test #55:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

50 1000000000
799279136 292354715 999125456 843799686 766475107 712280327 380002958 651806040 902920447 857510540 55335034 341658969 166044418 315780794 895716643 30669717 514229881 799618306 181914854 991985045 589250501 329812538 513093847 503892008 541711882 333980539 582581990 735878905 69490737...

output:

433 2

result:

ok 2 number(s): "433 2"

Test #56:

score: 0
Accepted
time: 0ms
memory: 3928kb

input:

50 503459134
641543919 884270508 552395948 87669731 862986722 785229166 14275382 428752730 151714219 146076486 647955630 175683804 33814326 812315970 314739380 583803079 416196433 379396001 306700952 658197755 182526661 637967660 960678045 520070406 401588537 699320496 858845562 267242583 477943294 ...

output:

624 8

result:

ok 2 number(s): "624 8"

Test #57:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

50 973382192
852404922 517655497 400633733 626507069 369563754 899647202 312111319 542135910 400507992 508271362 199107029 83337566 606616943 603818438 733762117 136936441 949566766 664206405 652825414 324410466 480835530 19751709 366793044 831216095 892868973 433256671 430076425 388540844 966011927...

output:

517 6

result:

ok 2 number(s): "517 6"

Test #58:

score: 0
Accepted
time: 0ms
memory: 5824kb

input:

100 3
9 10 7 2 8 1 8 5 1 10 5 2 3 8 2 2 0 6 1 5 8 1 4 9 7 10 8 1 6 3 6 0 10 0 1 0 4 9 9 8 3 3 2 4 0 6 6 7 10 3 8 1 9 1 9 5 5 9 9 7 8 5 9 3 5 6 9 8 3 10 4 8 8 1 9 9 1 3 7 1 7 10 6 4 2 0 7 2 1 6 9 6 6 6 0 6 0 8 4 0

output:

2500 2720542

result:

ok 2 number(s): "2500 2720542"

Test #59:

score: 0
Accepted
time: 1ms
memory: 4060kb

input:

100 9
1 0 6 5 2 5 0 1 4 5 5 8 1 5 2 4 7 0 7 2 1 9 0 7 10 6 10 2 2 3 8 4 1 6 4 2 3 2 10 9 3 5 5 8 3 10 7 6 6 1 6 1 10 9 7 8 7 10 8 9 1 4 8 8 3 7 2 10 7 0 3 5 2 2 5 8 3 9 8 8 5 2 5 1 3 0 1 1 0 10 9 1 8 8 9 7 8 2 1 7

output:

2065 2

result:

ok 2 number(s): "2065 2"

Test #60:

score: 0
Accepted
time: 0ms
memory: 5816kb

input:

100 10
0 9 8 0 4 8 10 8 0 8 9 7 2 6 6 4 10 5 9 0 5 1 6 1 5 6 3 6 3 4 10 8 9 3 5 10 2 2 0 7 1 8 4 8 6 3 4 8 6 10 3 7 4 3 7 10 4 6 3 8 1 6 4 9 8 3 9 5 7 0 5 1 10 10 5 8 8 4 9 0 3 9 8 2 4 7 2 1 7 2 5 3 8 0 7 9 9 6 4 10

output:

1984 16

result:

ok 2 number(s): "1984 16"

Test #61:

score: 0
Accepted
time: 1ms
memory: 4076kb

input:

100 74
92 42 51 50 81 97 29 15 99 24 77 61 21 52 35 81 2 2 96 68 87 73 1 16 39 21 4 92 62 54 66 27 63 42 72 78 40 40 86 33 28 27 91 0 88 76 56 7 24 47 63 77 3 11 77 83 71 14 69 29 19 72 17 22 14 35 77 24 7 14 7 12 97 83 82 44 81 23 13 69 72 32 57 47 71 73 94 59 66 96 27 96 65 98 86 49 82 78 19 37

output:

2386 2

result:

ok 2 number(s): "2386 2"

Test #62:

score: 0
Accepted
time: 1ms
memory: 5888kb

input:

100 53
81 86 25 5 64 55 89 48 10 32 78 59 20 48 90 65 58 55 28 10 91 15 48 73 14 71 34 80 35 11 16 100 11 35 31 18 1 34 41 87 47 5 69 23 58 51 90 62 2 80 54 7 10 88 24 75 34 53 91 70 48 43 90 65 2 58 83 52 28 71 59 100 3 30 10 38 30 37 49 60 53 60 40 6 50 81 44 46 96 46 29 5 23 58 27 30 80 69 72 83

output:

2492 2

result:

ok 2 number(s): "2492 2"

Test #63:

score: 0
Accepted
time: 1ms
memory: 5740kb

input:

100 100
3 8 78 83 82 13 12 47 79 7 35 11 19 89 100 16 1 96 29 63 6 91 83 19 11 97 53 57 66 93 0 61 16 28 34 92 99 74 86 29 45 84 11 47 96 59 68 27 82 89 55 71 17 42 72 100 53 25 69 45 43 15 30 7 91 69 78 23 96 28 20 30 77 77 5 54 80 72 84 83 79 31 89 44 63 90 61 33 4 86 99 27 25 29 0 22 57 93 24 28

output:

1808 6

result:

ok 2 number(s): "1808 6"

Test #64:

score: 0
Accepted
time: 1ms
memory: 6032kb

input:

100 746
549 943 542 53 608 902 671 639 563 665 600 419 489 203 69 862 294 109 382 246 922 818 936 727 644 658 768 445 460 238 514 810 51 366 977 887 318 20 764 745 810 227 920 794 727 960 22 766 685 898 364 78 161 701 761 745 142 643 78 263 916 849 889 295 525 936 484 947 369 517 531 328 191 30 718 ...

output:

2426 10

result:

ok 2 number(s): "2426 10"

Test #65:

score: 0
Accepted
time: 1ms
memory: 5936kb

input:

100 1000
81 73 655 2 774 116 41 569 906 845 13 423 592 274 621 505 614 804 94 272 746 758 918 51 707 278 619 248 32 768 836 173 508 392 101 957 791 663 29 657 901 568 84 151 475 385 178 963 100 972 873 83 695 776 429 284 347 172 205 528 479 859 106 290 676 372 39 207 322 387 781 135 676 106 11 454 3...

output:

1381 12

result:

ok 2 number(s): "1381 12"

Test #66:

score: 0
Accepted
time: 1ms
memory: 6016kb

input:

100 966
226 824 147 580 931 944 411 499 248 16 807 817 933 344 801 776 172 736 814 298 944 324 901 146 149 653 850 431 224 670 778 918 957 418 847 787 256 313 675 189 372 527 630 518 214 430 962 549 142 419 388 461 227 471 337 436 172 941 944 785 49 630 943 896 819 188 976 230 896 638 30 935 787 182...

output:

2041 2

result:

ok 2 number(s): "2041 2"

Test #67:

score: 0
Accepted
time: 1ms
memory: 6012kb

input:

100 100000
44980 22294 32719 28945 21068 44278 39443 34828 69836 96408 50426 40830 86418 42683 22313 15316 22132 7365 33876 26441 4390 66451 428 1493 56945 17478 2059 2334 95883 74516 8440 45422 41426 10824 83949 4150 22817 40083 21401 42428 95862 47687 50729 92029 63476 82955 13530 73853 77106 9758...

output:

1543 8

result:

ok 2 number(s): "1543 8"

Test #68:

score: 0
Accepted
time: 0ms
memory: 4064kb

input:

100 91071
32193 25428 85844 38970 70039 57731 81910 61472 82644 24349 5201 48655 69284 44666 29565 13198 66083 57687 26466 14705 39874 7144 23293 29498 5781 32937 21405 61339 71916 52988 98205 5278 30480 19739 98094 61782 74 37341 84237 42233 16089 81530 44916 88656 751 20291 25497 44185 26250 61811...

output:

1766 2

result:

ok 2 number(s): "1766 2"

Test #69:

score: 0
Accepted
time: 1ms
memory: 6068kb

input:

100 100000
30300 4214 55034 84235 19009 46837 89136 88116 71105 52291 43912 5172 52151 81889 61164 11080 50445 8009 94710 19034 10599 47837 57051 92745 19378 24049 89444 44689 12708 55808 74516 29894 43882 69067 12239 54654 77331 58947 98379 42038 60664 15372 74345 85282 62374 22387 37465 54930 5932...

output:

1695 2

result:

ok 2 number(s): "1695 2"

Test #70:

score: 0
Accepted
time: 0ms
memory: 4016kb

input:

100 492841952
50244540 380193575 95662462 359496200 316377112 70297993 217324427 198999272 74547737 386170396 76576146 204218061 68963779 294961031 370432812 61059906 19528767 92245474 122615640 191095930 347599451 19098580 204903584 432356648 234111131 279022284 54202258 480325994 215339524 2591059...

output:

1378 84

result:

ok 2 number(s): "1378 84"

Test #71:

score: 0
Accepted
time: 1ms
memory: 5992kb

input:

100 500000000
96970360 98746862 71203874 64932109 450238030 159668627 375196207 341130686 350164968 182855317 158438790 423052893 136105578 143734431 61414543 342146135 308354358 439991903 292550708 61242908 231122969 260016682 403484680 480445341 336088299 277384356 57387105 471044500 165576556 145...

output:

1706 24

result:

ok 2 number(s): "1706 24"

Test #72:

score: 0
Accepted
time: 1ms
memory: 4052kb

input:

100 474733943
51727952 112267437 251778000 475400732 379066236 159104685 238100698 280263042 217750427 182539297 445334148 28823240 408280090 195506891 252396274 328265076 97179948 82705618 54454004 23358116 409613774 182837587 102065776 120502262 51129950 478745488 355539240 166795718 25879013 4189...

output:

1623 20

result:

ok 2 number(s): "1623 20"

Test #73:

score: 0
Accepted
time: 0ms
memory: 5900kb

input:

100 971665706
567775692 225148306 284853961 74506045 127658181 266239688 68021672 140236565 236895051 864333041 883174534 764245141 405290517 409535649 943170619 801826942 292146623 930092201 361388966 679652079 982646932 930843436 812470239 512105172 323294773 217941822 136514187 289551923 70052617...

output:

1736 2

result:

ok 2 number(s): "1736 2"

Test #74:

score: 0
Accepted
time: 1ms
memory: 4136kb

input:

100 1000000000
20861893 452784880 795349774 765697917 287387681 75293275 243113141 318332276 321267732 728212159 776993902 430316106 885761159 802781441 829690946 925865187 738434872 790975048 97458246 209644523 393675255 876337658 711951195 368488549 364627247 404759025 332441448 154566013 91452688...

output:

1864 4

result:

ok 2 number(s): "1864 4"

Test #75:

score: 0
Accepted
time: 1ms
memory: 3976kb

input:

100 948902537
105351876 49017674 937249366 383260859 447117181 884346864 639542974 496427987 700607706 182025859 597184343 464983290 29795311 196027231 84807493 459968849 553319340 20454113 497091039 739636969 436107358 863301077 242835930 856275707 700927014 886543519 601997637 429645521 892444624 ...

output:

1573 2

result:

ok 2 number(s): "1573 2"

Test #76:

score: 0
Accepted
time: 1ms
memory: 5672kb

input:

200 10
8 3 0 6 6 1 4 7 7 10 3 4 0 7 2 4 6 9 10 7 6 0 6 8 0 10 0 6 4 9 5 3 10 5 0 3 8 5 5 10 2 10 7 9 5 1 3 8 7 3 2 2 1 0 6 2 10 2 2 1 0 7 4 3 1 6 6 5 3 6 5 1 7 10 6 7 5 9 4 7 7 5 1 4 3 9 4 8 3 5 3 4 1 7 8 8 6 2 8 0 3 4 1 9 0 9 5 5 4 8 10 1 10 10 8 3 4 9 10 4 5 1 0 8 7 3 8 7 5 9 4 7 9 2 10 0 10 2 10 ...

output:

7422 2

result:

ok 2 number(s): "7422 2"

Test #77:

score: 0
Accepted
time: 1ms
memory: 6096kb

input:

200 8
7 5 3 1 1 1 3 3 6 4 7 6 1 4 7 7 9 6 9 4 6 8 9 2 4 2 0 6 0 10 10 4 1 3 4 5 8 5 3 8 3 9 7 9 9 5 4 4 7 9 3 5 3 9 4 5 5 6 1 10 10 2 0 8 10 2 2 7 3 7 7 8 0 0 3 10 7 4 8 4 9 8 7 8 5 8 10 1 2 1 3 3 10 6 6 5 7 2 4 4 3 6 3 4 9 10 6 4 3 7 2 5 6 2 5 4 6 0 8 6 1 7 6 3 0 0 8 9 3 2 0 7 0 7 2 7 2 10 1 10 7 9...

output:

8784 21252

result:

ok 2 number(s): "8784 21252"

Test #78:

score: 0
Accepted
time: 1ms
memory: 5640kb

input:

200 10
9 3 2 4 9 4 2 3 9 6 7 8 3 1 0 9 5 4 10 1 6 1 8 3 2 6 9 10 0 7 8 8 6 9 5 6 7 9 4 5 4 1 10 9 2 2 1 7 2 0 5 4 7 3 3 7 6 3 3 8 3 4 10 10 0 2 9 2 3 4 5 5 8 8 2 6 2 10 5 8 10 2 3 2 6 5 0 8 1 1 3 1 0 9 5 6 8 6 4 3 3 8 2 3 7 8 6 6 6 5 2 3 10 4 8 8 5 7 0 5 8 9 6 5 1 1 4 7 2 2 4 7 3 6 10 6 1 2 8 5 0 0 ...

output:

7259 2

result:

ok 2 number(s): "7259 2"

Test #79:

score: 0
Accepted
time: 1ms
memory: 5796kb

input:

200 86
85 82 75 98 86 31 86 88 55 33 61 93 95 31 12 57 79 17 58 56 99 3 82 23 47 30 37 59 81 62 25 82 42 31 35 71 0 12 76 54 27 99 98 27 10 83 51 12 7 73 53 98 79 25 7 56 96 97 35 6 37 57 66 60 37 73 64 73 19 71 7 54 5 73 48 86 67 30 66 62 68 6 28 31 90 51 36 31 61 42 44 53 71 75 50 98 33 55 57 84 3...

output:

8267 2

result:

ok 2 number(s): "8267 2"

Test #80:

score: 0
Accepted
time: 1ms
memory: 6528kb

input:

200 31
7 37 49 87 36 90 77 20 34 98 51 56 94 61 33 41 56 2 81 98 81 46 93 69 44 23 68 69 11 76 8 43 80 57 95 43 30 84 32 7 14 66 41 50 59 47 52 45 30 50 88 61 18 1 88 81 25 25 24 14 100 28 6 47 92 85 92 0 75 60 2 42 79 19 77 70 16 44 0 52 50 45 44 1 35 27 43 86 58 82 46 75 62 46 23 55 31 79 9 29 75 ...

output:

10000 833722229

result:

ok 2 number(s): "10000 833722229"

Test #81:

score: 0
Accepted
time: 1ms
memory: 4596kb

input:

200 71
7 81 34 99 87 49 68 20 46 74 19 43 3 68 43 93 43 43 14 83 86 32 38 14 85 74 98 57 52 0 60 48 29 17 19 16 82 78 44 83 33 77 18 74 29 55 30 43 77 26 78 92 26 45 35 5 55 97 35 22 62 32 79 90 80 7 87 72 7 5 54 62 53 77 73 53 66 79 36 65 32 16 27 60 49 2 61 73 56 90 92 17 64 6 97 36 7 60 29 86 24 ...

output:

9508 2

result:

ok 2 number(s): "9508 2"

Test #82:

score: 0
Accepted
time: 1ms
memory: 5928kb

input:

200 410
704 967 769 406 465 677 91 601 914 63 129 258 150 10 705 868 50 242 172 353 419 874 480 585 919 957 3 92 53 442 979 472 63 911 81 67 32 692 873 858 846 981 558 924 348 583 712 10 414 782 130 378 664 617 417 97 559 723 911 793 837 822 889 218 264 442 206 980 160 730 583 536 139 488 881 529 46...

output:

10000 223695341

result:

ok 2 number(s): "10000 223695341"

Test #83:

score: 0
Accepted
time: 1ms
memory: 6140kb

input:

200 1000
467 716 262 984 631 512 80 531 249 243 915 651 873 80 885 511 370 937 265 760 244 441 463 911 982 330 854 895 625 972 301 225 512 945 214 517 116 715 757 389 317 320 103 663 96 8 496 208 457 849 646 764 188 319 85 256 764 872 649 438 407 212 726 824 796 259 754 621 114 981 213 334 3 191 794...

output:

6535 2

result:

ok 2 number(s): "6535 2"

Test #84:

score: 0
Accepted
time: 1ms
memory: 5684kb

input:

200 1000
1000 847 374 941 788 338 450 80 211 423 708 664 594 531 436 162 309 862 977 786 441 7 64 624 35 713 84 70 205 882 624 208 349 970 959 968 970 977 403 691 27 660 657 29 455 53 652 414 872 543 154 141 721 394 994 416 589 640 395 695 971 604 944 819 940 75 690 262 67 852 463 141 495 267 79 364...

output:

6445 6

result:

ok 2 number(s): "6445 6"

Test #85:

score: 0
Accepted
time: 0ms
memory: 4512kb

input:

200 78442
48824 228 89892 22257 23278 29012 1531 42033 38323 11752 32624 54381 2114 91411 56811 40347 10543 8969 47958 93067 41047 16154 69987 89012 42661 11696 28561 69583 83279 52739 34778 2538 59428 73593 2993 37761 10512 48771 12065 39454 78487 326 89909 76338 24973 95967 9383 74074 70074 34965 ...

output:

8317 2

result:

ok 2 number(s): "8317 2"

Test #86:

score: 0
Accepted
time: 0ms
memory: 5840kb

input:

200 100000
71278 3362 7774 32282 47902 18118 43998 33436 51131 39695 71334 62206 49741 28634 88410 38229 30146 83638 40548 81331 87425 81195 68504 52257 80605 27155 12665 52934 59312 31212 75850 27154 8069 58161 17139 30634 87769 46030 50554 14912 98716 9822 59750 72965 62249 73716 72658 84819 67912...

output:

6196 2

result:

ok 2 number(s): "6196 2"

Test #87:

score: 0
Accepted
time: 0ms
memory: 6292kb

input:

200 55315
93732 71255 60899 77547 96874 7225 75571 60080 39592 91984 50457 18723 56954 30617 95662 60458 74097 69200 73550 10007 82497 21888 2262 15503 29441 18268 32011 47179 10998 34031 65614 87011 21471 31835 31284 63919 266 67635 48630 14717 43290 68012 89178 93938 23871 11052 84626 30804 52297 ...

output:

9908 12

result:

ok 2 number(s): "9908 12"

Test #88:

score: 0
Accepted
time: 1ms
memory: 4596kb

input:

200 300437281
257286773 487307195 368804075 467166545 377057537 142118418 102048642 199820557 489745357 227847491 423617755 287139406 399865568 464479804 159967794 434171871 113805407 146530544 33821741 178176441 407225126 62768818 128499524 10414675 197851149 39241028 81750226 164481115 252591039 3...

output:

9905 2

result:

ok 2 number(s): "9905 2"

Test #89:

score: 0
Accepted
time: 0ms
memory: 6220kb

input:

200 173866217
304012593 827769 344345488 172602454 10918455 139520823 259920421 341951971 357330816 227531471 5480399 300941525 467007367 108220492 350949526 33355294 402630998 494276974 408789522 50357073 290748643 190622436 235112392 150471598 209893742 37603101 84935074 155199621 112893496 208562...

output:

10000 531518878

result:

ok 2 number(s): "10000 531518878"

Test #90:

score: 0
Accepted
time: 1ms
memory: 5608kb

input:

200 500000000
258770184 106316573 24919612 83071077 347778432 433924169 122824912 281084327 427915334 227215451 87343043 111744586 34149165 456993893 246963969 19474235 99488360 136990689 78724589 420504052 174272161 226507825 228660775 85495807 424935394 443996945 88119921 350950840 268163240 95010...

output:

6030 4

result:

ok 2 number(s): "6030 4"

Test #91:

score: 0
Accepted
time: 1ms
memory: 6336kb

input:

200 884255976
778636695 448467879 133091746 318376092 634235214 339188527 365857608 622215964 485688824 857931696 139358641 598269975 978093134 201038116 362193355 59993012 194113175 509869896 117578844 345864789 280955800 902562068 628650656 823250861 814575209 951877999 412777759 115882892 7785293...

output:

8206 6

result:

ok 2 number(s): "8206 6"

Test #92:

score: 0
Accepted
time: 1ms
memory: 6248kb

input:

200 1000000000
568159386 676104453 643587558 304535254 88932005 148242114 467320149 800311675 865028797 16778105 959549082 632937160 753531067 594283908 617309903 184031257 640401424 370752743 443582708 875857235 691984124 889525488 454502683 16070726 855907684 433662492 608705020 685929692 57952132...

output:

7646 20

result:

ok 2 number(s): "7646 20"

Test #93:

score: 0
Accepted
time: 1ms
memory: 5940kb

input:

200 1000000000
21245587 272337247 490519858 627130905 248661505 662328410 937378910 273374677 317997698 470591806 779739522 299008124 602597928 692562408 503830231 13102210 86689672 10297226 548248209 405849680 29383518 171456198 648950930 872454105 560803669 251883475 509664989 255976491 970447840 ...

output:

6187 40

result:

ok 2 number(s): "6187 40"

Test #94:

score: 0
Accepted
time: 0ms
memory: 8516kb

input:

500 10
10 5 8 2 0 1 9 3 6 4 3 5 8 8 4 3 5 5 7 9 1 6 4 6 8 2 1 0 1 3 6 9 1 0 9 5 7 7 3 7 4 6 0 1 8 0 6 3 8 5 7 7 10 5 3 0 9 3 6 6 2 9 4 7 0 9 3 3 2 7 3 4 2 1 5 8 9 6 6 6 7 1 8 9 8 1 8 7 2 0 4 9 2 5 5 0 6 7 0 3 1 4 6 3 0 3 1 7 4 10 7 1 7 10 1 3 9 0 1 2 6 1 1 1 7 9 1 4 7 10 9 3 6 8 8 1 0 7 7 5 5 2 10 4...

output:

42547 2

result:

ok 2 number(s): "42547 2"

Test #95:

score: 0
Accepted
time: 0ms
memory: 8284kb

input:

500 10
5 4 0 7 9 4 9 10 6 6 0 7 6 0 7 2 8 3 8 6 5 2 0 4 0 1 1 5 2 1 7 10 10 9 9 2 10 7 8 4 8 5 10 4 3 4 7 2 5 4 4 10 4 0 2 3 10 8 1 1 2 0 6 9 1 1 0 5 2 0 5 8 6 2 4 8 7 1 3 5 1 6 3 3 2 1 9 4 1 4 4 0 6 8 4 5 6 1 3 6 1 2 9 2 10 8 2 2 3 8 0 2 0 1 4 4 8 4 0 4 1 7 3 6 0 10 5 10 5 10 8 7 1 10 1 7 7 4 2 0 6...

output:

44430 2

result:

ok 2 number(s): "44430 2"

Test #96:

score: 0
Accepted
time: 0ms
memory: 8664kb

input:

500 10
8 5 2 10 3 4 4 10 5 8 3 10 7 1 0 5 3 0 3 4 4 5 6 9 10 8 3 2 1 2 9 3 0 7 2 4 10 0 2 6 6 8 9 0 7 1 4 4 0 1 2 2 5 1 1 5 8 4 0 7 3 7 5 7 10 9 3 0 6 8 3 4 10 10 3 5 2 7 8 9 10 5 5 2 3 9 0 4 7 0 4 6 7 3 6 6 7 1 0 2 1 4 4 8 4 2 2 8 9 7 0 7 7 4 1 0 10 6 9 2 8 10 2 8 0 0 1 8 3 6 5 10 7 4 8 6 6 1 6 10 ...

output:

44276 202540

result:

ok 2 number(s): "44276 202540"

Test #97:

score: 0
Accepted
time: 2ms
memory: 8460kb

input:

500 100
8 21 11 86 45 58 97 95 4 30 26 65 2 71 55 63 49 73 47 38 82 52 62 10 24 69 59 95 41 41 58 44 70 76 46 2 72 82 73 47 82 43 85 7 34 60 71 74 13 40 76 5 24 46 89 61 81 78 12 83 94 32 80 74 27 42 56 86 22 13 17 47 44 63 37 72 71 84 22 18 24 26 10 37 35 46 35 27 48 62 62 0 88 52 39 99 31 54 95 36...

output:

43981 8

result:

ok 2 number(s): "43981 8"

Test #98:

score: 0
Accepted
time: 2ms
memory: 8408kb

input:

500 41
98 33 96 99 96 16 55 95 16 5 84 17 1 68 8 14 26 13 81 91 86 27 40 57 20 30 23 5 71 55 41 38 18 69 38 75 1 42 28 33 0 10 27 30 72 24 4 38 36 38 66 69 31 89 36 64 10 5 23 91 78 3 52 51 14 54 51 13 78 71 80 34 17 9 33 55 88 30 58 8 49 98 59 97 81 22 52 82 46 1 75 10 90 23 12 91 97 45 80 82 15 80...

output:

62500 128218127

result:

ok 2 number(s): "62500 128218127"

Test #99:

score: 0
Accepted
time: 2ms
memory: 8732kb

input:

500 62
20 88 37 54 46 65 79 26 96 81 86 15 0 75 18 77 82 88 14 10 57 70 87 70 61 45 53 61 45 47 93 100 56 73 98 81 31 47 52 76 88 88 38 54 9 32 83 3 15 82 68 100 61 65 16 21 62 45 34 99 40 75 25 4 2 77 46 85 78 16 31 55 91 89 61 71 26 32 93 89 99 25 42 66 27 98 70 69 8 41 77 31 48 95 54 72 5 58 33 2...

output:

61391 2

result:

ok 2 number(s): "61391 2"

Test #100:

score: 0
Accepted
time: 2ms
memory: 8212kb

input:

500 529
398 20 225 862 417 243 350 351 563 264 460 934 539 803 8 19 472 15 907 825 674 685 361 398 115 980 709 643 990 823 754 239 84 425 39 990 16 689 444 585 194 255 18 838 974 700 799 613 617 276 682 46 526 149 767 649 197 218 11 770 466 114 501 360 634 95 746 856 685 376 252 388 503 743 616 415 ...

output:

62500 5334252

result:

ok 2 number(s): "62500 5334252"

Test #101:

score: 0
Accepted
time: 2ms
memory: 6708kb

input:

500 984
550 771 719 439 583 77 340 273 907 817 254 326 881 245 560 911 30 329 238 851 871 872 343 485 789 354 178 818 562 352 457 611 541 459 792 58 862 712 710 116 665 968 945 204 714 125 574 811 40 343 428 424 58 844 435 188 403 359 758 26 28 505 719 966 778 912 301 497 639 627 883 186 988 820 902...

output:

41691 12

result:

ok 2 number(s): "41691 12"

Test #102:

score: 0
Accepted
time: 0ms
memory: 8332kb

input:

500 1000
313 902 212 388 740 913 710 585 249 997 667 712 984 936 120 562 970 14 950 638 688 819 326 811 232 355 28 621 133 882 399 975 989 866 917 508 334 354 355 418 375 308 490 562 80 170 357 8 456 418 945 810 583 928 343 348 608 127 885 664 972 896 556 961 301 348 237 130 203 871 132 374 860 904 ...

output:

41691 16

result:

ok 2 number(s): "41691 16"

Test #103:

score: 0
Accepted
time: 2ms
memory: 8720kb

input:

500 78926
19942 23136 63965 42606 81217 83216 96080 82272 54680 52616 47087 70687 51766 59382 84651 10266 57150 46408 8826 17290 8045 73547 29965 22047 26716 94352 75436 6570 29401 38716 56820 6020 67848 61897 35783 49490 44078 34424 94951 70947 61606 98656 34409 4918 93400 67133 99558 15148 57260 1...

output:

57300 10

result:

ok 2 number(s): "57300 10"

Test #104:

score: 0
Accepted
time: 2ms
memory: 8200kb

input:

500 6297
18048 50617 17089 87872 5840 72322 78959 8915 32247 80558 26209 2858 10285 61365 16250 97255 65860 96730 52722 70314 78770 89894 28483 85293 75554 34157 83888 25161 81088 41536 22237 90224 16489 35572 74276 18015 96989 31682 33440 46405 81834 32498 63837 1545 30675 28816 22419 50240 65992 5...

output:

62500 311392143

result:

ok 2 number(s): "62500 311392143"

Test #105:

score: 0
Accepted
time: 2ms
memory: 8508kb

input:

500 100000
16155 94164 70214 33136 54811 61429 21425 59906 45055 32846 40573 35030 93152 98588 88262 95137 85464 22705 45312 98990 49495 30586 27000 24191 89150 49617 3232 84166 57121 20008 22895 14838 29891 20140 88421 75647 98593 77635 31516 46209 77715 66341 33678 22518 92298 6565 34387 96226 394...

output:

40675 96

result:

ok 2 number(s): "40675 96"

Test #106:

score: 0
Accepted
time: 2ms
memory: 8080kb

input:

500 206919611
378413470 82519085 280197142 495210293 467130584 173643235 348189514 499285354 122273730 363909606 167741640 420805304 76507389 475069776 143670879 302766638 396635328 219451182 85537240 256549764 201200288 377715992 215350889 18459793 114234767 116898205 482491329 13947421 92508204 41...

output:

62500 159109639

result:

ok 2 number(s): "62500 159109639"

Test #107:

score: 0
Accepted
time: 0ms
memory: 7800kb

input:

500 335598306
425139290 96039660 255738555 200646202 190926077 376078353 6061293 346449480 397890961 455561815 46605226 231608364 143649188 118810464 334652611 288885579 93492690 454133127 255472308 218664971 84723805 300536897 413931985 158516715 329276420 228324761 280643463 209698640 339746178 30...

output:

60609 2

result:

ok 2 number(s): "60609 2"

Test #108:

score: 0
Accepted
time: 0ms
memory: 8508kb

input:

500 77533735
379896881 109560235 436312680 111114825 324786995 170481698 163933072 80549123 173508191 160278507 333500583 245410483 210790987 467583866 322635283 275004520 177285568 301879556 130440088 88811950 468247323 336422286 20544851 298573637 431253588 21654121 283828311 200417146 495015923 2...

output:

62500 16568274

result:

ok 2 number(s): "62500 16568274"

Test #109:

score: 0
Accepted
time: 2ms
memory: 8472kb

input:

500 1000000000
674027265 233524722 382837808 49986230 670271965 304536948 259365416 625929013 895633654 92225755 760653107 247602334 286435566 617014718 692890495 645764171 236449321 659268400 860984938 385972118 175882407 900656361 888464853 503189833 657012736 785090306 167939547 4941217 906298794...

output:

43039 6

result:

ok 2 number(s): "43039 6"

Test #110:

score: 0
Accepted
time: 2ms
memory: 7860kb

input:

500 176232295
832146176 829757516 524737400 36145392 903630393 113590535 65860665 98992015 53635263 956104874 285876255 208640591 430469720 10260509 948007043 474835124 977704862 888747467 260617729 915964564 881878022 182587072 714316880 359573210 361908721 898278580 363866808 869955309 2258020 581...

output:

62500 114342420

result:

ok 2 number(s): "62500 114342420"

Test #111:

score: 0
Accepted
time: 2ms
memory: 8384kb

input:

500 1000000000
916636158 57394090 371669701 358741043 358327184 922644123 167323206 982120435 432975236 409918575 474662916 243307775 910940362 403506301 129494661 303906078 87556621 823259241 291654302 445957008 292906345 464517783 613797836 215956588 403241196 85095782 928390289 440002108 98217248...

output:

38781 16

result:

ok 2 number(s): "38781 16"

Test #112:

score: 0
Accepted
time: 3ms
memory: 12212kb

input:

1000 4
8 0 6 2 8 10 4 10 5 10 5 5 1 1 10 9 6 0 7 7 8 4 6 10 9 8 2 6 4 6 6 8 2 0 0 10 5 6 5 7 2 7 3 8 9 6 5 6 3 5 3 3 0 6 0 1 7 3 1 6 0 6 9 9 1 5 5 2 5 3 2 8 1 9 6 10 1 4 6 6 3 10 5 9 0 3 3 5 10 8 1 8 3 5 10 0 1 3 3 2 8 3 4 8 10 9 3 6 6 7 2 4 8 5 4 5 0 9 10 1 7 3 6 5 8 10 10 0 10 5 9 7 3 4 6 1 0 6 1 ...

output:

250000 94956203

result:

ok 2 number(s): "250000 94956203"

Test #113:

score: 0
Accepted
time: 4ms
memory: 12640kb

input:

1000 10
2 5 6 1 8 9 2 8 1 2 9 2 3 5 4 0 4 0 5 0 8 2 1 4 9 0 6 7 10 1 6 9 3 10 2 3 4 9 4 7 8 9 1 6 4 3 2 2 4 0 0 2 6 7 8 3 6 3 3 8 2 4 5 9 1 5 1 6 1 7 6 3 7 7 8 6 4 9 9 9 5 1 0 10 1 8 7 7 1 2 10 7 4 2 1 10 1 3 10 6 0 6 1 1 3 9 7 1 2 0 3 6 4 5 5 7 4 8 6 5 1 3 3 7 2 2 10 5 7 6 1 8 4 6 8 1 8 10 1 6 10 2...

output:

183549 321120056

result:

ok 2 number(s): "183549 321120056"

Test #114:

score: 0
Accepted
time: 4ms
memory: 12532kb

input:

1000 10
6 10 1 10 8 9 5 7 3 8 2 6 2 2 10 6 3 2 4 4 0 0 8 1 9 8 3 6 5 7 9 10 8 2 5 4 7 10 3 10 5 1 4 8 10 8 8 10 8 8 1 2 6 4 5 8 5 0 3 6 4 6 6 9 1 2 9 6 8 9 6 1 9 4 6 10 10 6 1 3 10 3 7 1 6 6 10 8 10 7 8 2 6 2 9 1 9 10 7 3 4 2 9 1 7 7 0 8 10 7 4 4 10 9 10 7 3 6 1 4 9 10 8 2 10 8 9 6 4 0 7 2 8 2 8 1 9...

output:

187886 956127263

result:

ok 2 number(s): "187886 956127263"

Test #115:

score: 0
Accepted
time: 0ms
memory: 12424kb

input:

1000 77
98 99 22 7 84 75 22 20 20 37 29 20 71 5 34 6 14 27 39 74 98 0 99 48 19 13 20 37 65 12 48 66 47 14 34 38 53 72 65 71 16 20 51 48 68 5 65 52 72 76 33 49 70 97 1 94 52 72 44 50 57 58 15 78 81 33 64 67 72 31 47 52 80 95 39 7 74 27 83 81 84 37 100 10 19 93 76 38 28 19 95 70 39 59 87 10 82 28 6 62...

output:

229139 90

result:

ok 2 number(s): "229139 90"

Test #116:

score: 0
Accepted
time: 3ms
memory: 12020kb

input:

1000 7
70 54 82 23 19 31 95 88 97 10 26 61 50 49 10 4 29 90 60 20 73 45 95 44 96 47 20 24 39 15 35 78 24 78 60 100 36 63 53 70 42 61 78 38 64 0 38 80 99 9 77 68 84 71 75 63 57 38 32 1 74 75 53 0 18 74 80 79 49 31 90 61 81 28 16 72 81 58 76 33 68 76 15 96 65 59 27 0 75 47 85 8 27 55 36 28 49 33 64 73...

output:

250000 532635999

result:

ok 2 number(s): "250000 532635999"

Test #117:

score: 0
Accepted
time: 4ms
memory: 12260kb

input:

1000 100
20 78 63 96 65 19 34 11 96 52 69 78 30 71 75 2 55 75 80 32 3 58 90 85 38 91 89 32 14 75 90 24 46 40 63 60 40 89 5 37 35 0 4 38 70 63 54 64 69 32 98 43 54 46 13 54 28 15 77 20 47 23 35 11 56 50 28 58 26 76 31 25 70 51 59 92 20 10 58 18 86 81 43 70 11 59 100 63 11 30 8 15 72 52 61 91 59 71 11...

output:

168392 1430

result:

ok 2 number(s): "168392 1430"

Test #118:

score: 0
Accepted
time: 4ms
memory: 12712kb

input:

1000 1000
184 293 333 363 259 707 621 218 889 402 123 610 779 222 597 391 59 870 340 70 671 313 826 835 5 662 542 820 687 637 390 779 260 313 164 932 894 431 19 996 316 669 421 542 588 889 542 318 900 672 902 585 311 69 558 702 498 987 367 116 69 101 602 479 238 832 995 612 44 596 70 893 754 503 867...

output:

166540 2

result:

ok 2 number(s): "166540 2"

Test #119:

score: 0
Accepted
time: 2ms
memory: 12700kb

input:

1000 960
199 528 305 220 34 746 202 562 286 931 724 279 958 858 603 529 573 271 828 568 354 477 685 101 685 897 800 421 891 483 61 791 813 37 726 638 938 158 521 652 68 75 551 783 219 205 787 55 395 65 582 79 615 726 530 118 578 819 897 37 42 101 525 600 117 554 27 785 257 27 889 602 219 285 244 748...

output:

181389 4

result:

ok 2 number(s): "181389 4"

Test #120:

score: 0
Accepted
time: 0ms
memory: 12008kb

input:

1000 897
843 142 47 77 430 546 164 524 692 832 571 949 764 883 990 294 707 52 324 446 37 649 543 376 356 752 828 394 476 948 725 414 603 150 906 352 601 275 634 307 830 722 443 785 462 276 652 793 899 450 882 954 920 382 891 917 286 651 426 197 397 93 829 720 4 276 441 965 478 833 715 549 304 448 2 ...

output:

199975 12

result:

ok 2 number(s): "199975 12"

Test #121:

score: 0
Accepted
time: 4ms
memory: 12088kb

input:

1000 100000
41891 77338 80785 45525 17055 27050 69374 57697 12361 17738 86143 97268 96901 66791 34221 56240 88724 38900 46684 17655 83913 49017 51060 71110 9454 69010 75621 88482 88230 86143 92461 78070 66984 36481 49637 31074 24647 54899 87084 47764 94532 44173 8138 96873 24937 50156 10413 57436 93...

output:

165527 4

result:

ok 2 number(s): "165527 4"

Test #122:

score: 0
Accepted
time: 4ms
memory: 12064kb

input:

1000 74206
44172 58856 98444 23388 1790 89140 76578 1837 62947 24283 75347 2070 56522 25635 59252 20304 49915 42087 37656 65206 33617 94228 38578 45933 28020 11577 78111 75878 42106 63788 89990 80006 54099 79874 83248 29663 68576 80804 84110 30389 71517 59007 16794 82717 2708 21663 10634 85645 65804...

output:

229717 504

result:

ok 2 number(s): "229717 504"

Test #123:

score: 0
Accepted
time: 5ms
memory: 12504kb

input:

1000 84489
22106 80788 67409 25598 86525 75575 72889 5565 2639 66070 88898 42115 29596 60133 84283 43956 75866 20927 69042 37103 42908 63785 61337 55996 22238 13731 21012 87621 20330 65780 47106 33247 16867 74572 27753 17357 77265 47121 56790 13015 64569 73840 76757 44214 67027 68823 51268 27306 318...

output:

212772 12

result:

ok 2 number(s): "212772 12"

Test #124:

score: 0
Accepted
time: 4ms
memory: 12128kb

input:

1000 500000000
313490854 123416926 11611646 63847679 367366117 469869276 49883265 270268941 41436393 103345616 303190415 380708548 308631480 208440724 312723310 166871005 184533373 215270407 127992471 254858075 464361403 257631406 446277012 333489320 21945839 376306071 448198330 3635296 180226920 47...

output:

169630 24

result:

ok 2 number(s): "169630 24"

Test #125:

score: 0
Accepted
time: 4ms
memory: 10856kb

input:

1000 415324841
12572702 488526769 324314704 327527163 347218313 354593490 347705492 480433848 178080775 245354512 386111760 211610336 183182965 497975707 3932470 261147645 443851157 126476508 412073923 224549175 99999870 294291831 24335040 207294763 282164585 403854039 132353451 358984008 446234736 ...

output:

216129 2

result:

ok 2 number(s): "216129 2"

Test #126:

score: 0
Accepted
time: 3ms
memory: 12052kb

input:

1000 218140085
414653609 261668381 431985049 388207589 419038738 239317704 348526777 395631467 427789642 92396121 264000392 134480353 149702679 197576114 195141630 150391572 203168940 150747093 104187145 489207562 438637396 12855058 489328585 376067495 247416042 44466491 21541285 101268234 214276205...

output:

250000 96193945

result:

ok 2 number(s): "250000 96193945"

Test #127:

score: 0
Accepted
time: 0ms
memory: 11936kb

input:

1000 957604291
775594614 898178314 444197951 272661962 963232500 430212823 39111527 575948125 427939103 380167029 53901100 621987553 873222511 238299357 45299397 425877706 353288909 861695623 581148008 285171883 421104440 337441988 337610620 555419837 936602843 492538371 713210706 102817243 97857453...

output:

181287 2

result:

ok 2 number(s): "181287 2"

Test #128:

score: 0
Accepted
time: 0ms
memory: 12668kb

input:

1000 818684973
703946895 746416099 688067997 74206285 741214047 728048759 816058218 488305409 421537759 562722208 592958643 194790169 706194176 25918313 229836540 622811551 638099313 207820084 952393427 583480753 392823073 743556988 943723601 46700272 301942798 63769234 244574384 590885876 645483784...

output:

217690 6

result:

ok 2 number(s): "217690 6"

Test #129:

score: 0
Accepted
time: 0ms
memory: 10848kb

input:

1000 1000000000
632299176 299686591 226905334 875750610 814162885 25884695 929441397 442131890 710103706 113873606 795579697 767592786 497696644 444941051 488002610 524778103 217877009 553944546 618606138 881789622 406010903 486108477 959901998 906576928 35878973 340032806 70905353 668889092 6073603...

output:

163255 12

result:

ok 2 number(s): "163255 12"

Test #130:

score: 0
Accepted
time: 8ms
memory: 18688kb

input:

2000 10
1 6 9 1 2 2 10 3 8 2 5 7 6 2 10 8 5 1 9 4 8 1 1 4 8 5 2 0 3 10 8 1 4 5 3 3 8 9 6 8 2 6 6 4 5 3 6 5 3 3 1 3 1 0 10 3 5 3 1 1 4 4 4 0 0 1 8 8 9 1 4 5 6 0 6 10 6 10 6 3 1 9 4 2 1 0 4 1 9 0 1 7 0 8 9 4 1 3 2 5 8 6 7 3 4 3 7 5 5 5 1 1 4 8 4 2 2 0 5 3 3 6 9 0 9 7 10 2 9 8 6 7 5 5 10 3 3 10 4 9 5 5...

output:

731894 2

result:

ok 2 number(s): "731894 2"

Test #131:

score: 0
Accepted
time: 8ms
memory: 18632kb

input:

2000 10
8 3 8 10 9 10 2 6 0 4 5 0 5 2 8 3 8 5 0 8 8 3 0 9 0 6 3 1 6 1 0 2 5 1 2 7 4 6 9 8 6 1 10 9 0 0 10 2 4 1 1 6 0 8 3 5 0 8 8 7 6 10 7 7 6 9 8 1 1 5 0 6 0 4 7 3 5 4 9 6 7 4 7 7 10 8 0 3 0 6 6 2 5 8 10 3 9 7 10 2 4 1 4 0 8 1 8 0 2 9 3 6 0 4 9 4 6 3 4 3 8 6 6 2 9 2 9 0 5 6 4 1 10 9 5 3 0 3 8 2 1 4...

output:

713724 40246447

result:

ok 2 number(s): "713724 40246447"

Test #132:

score: 0
Accepted
time: 8ms
memory: 18700kb

input:

2000 9
9 8 4 1 5 9 4 0 10 2 6 4 4 9 0 9 6 7 9 2 0 1 7 10 0 8 1 10 6 5 10 3 9 8 9 1 10 9 4 7 9 3 7 4 2 1 9 9 4 3 10 5 7 9 3 3 10 0 9 5 8 4 8 10 10 2 5 1 1 9 0 9 9 1 5 10 8 1 2 9 9 3 7 5 7 5 8 5 6 3 8 8 3 5 8 2 2 3 10 10 4 0 1 0 9 1 1 9 10 2 5 0 7 7 2 8 2 1 4 4 5 2 0 4 10 2 1 8 6 0 3 10 0 4 0 0 8 3 8 ...

output:

845574 2

result:

ok 2 number(s): "845574 2"

Test #133:

score: 0
Accepted
time: 8ms
memory: 18484kb

input:

2000 93
54 53 7 97 34 67 13 20 32 46 63 41 70 12 88 91 70 79 73 15 80 76 77 94 16 97 50 26 5 70 100 60 85 40 26 11 83 77 89 24 3 88 72 39 38 13 66 17 18 52 92 80 77 39 49 97 82 44 66 91 52 29 88 20 1 78 59 37 3 88 98 50 21 8 68 1 80 41 28 71 66 76 48 36 65 68 94 36 58 37 97 91 42 30 16 35 81 52 70 7...

output:

768768 2

result:

ok 2 number(s): "768768 2"

Test #134:

score: 0
Accepted
time: 8ms
memory: 18624kb

input:

2000 100
60 77 56 68 70 55 86 88 98 87 95 24 49 56 53 89 17 31 25 62 44 88 73 91 93 7 51 1 81 29 86 39 74 3 63 4 87 35 8 23 28 27 88 61 44 8 82 12 21 75 45 99 59 14 55 88 87 78 10 9 36 79 36 43 6 97 75 16 48 20 40 48 21 75 45 55 87 94 10 56 83 47 42 22 79 35 33 88 5 88 87 29 87 27 9 20 58 46 17 18 1...

output:

694918 85008

result:

ok 2 number(s): "694918 85008"

Test #135:

score: 0
Accepted
time: 9ms
memory: 19184kb

input:

2000 85
43 33 4 84 83 10 59 11 74 60 26 65 29 33 29 19 32 15 13 52 87 0 69 98 46 51 18 10 44 32 40 18 51 66 55 22 70 93 62 12 54 67 47 51 40 71 55 61 81 8 89 6 95 89 61 80 58 44 88 61 9 95 19 32 33 73 23 29 26 32 83 13 44 41 55 75 26 45 60 9 0 18 59 40 57 78 17 50 41 37 21 69 75 23 2 72 68 52 64 95 ...

output:

851054 980628

result:

ok 2 number(s): "851054 980628"

Test #136:

score: 0
Accepted
time: 14ms
memory: 18860kb

input:

2000 718
948 43 446 941 424 541 992 140 231 582 297 3 500 292 148 34 379 795 432 477 877 880 189 160 67 43 393 623 879 547 713 142 717 339 289 382 739 693 666 535 787 8 967 909 336 934 698 524 934 747 409 971 224 764 227 480 704 135 105 754 640 492 828 465 762 268 931 634 617 458 319 700 626 587 541...

output:

930396 20

result:

ok 2 number(s): "930396 20"

Test #137:

score: 0
Accepted
time: 22ms
memory: 18780kb

input:

2000 308
972 38 179 178 199 961 572 484 629 102 136 673 299 929 155 180 512 965 540 355 560 43 667 816 119 899 31 604 471 12 765 155 268 71 470 95 402 801 787 191 540 34 477 530 960 631 562 253 819 132 97 465 139 420 199 278 403 587 635 914 995 492 742 205 649 371 964 807 210 271 146 408 322 369 911...

output:

1000000 834492362

result:

ok 2 number(s): "1000000 834492362"

Test #138:

score: 0
Accepted
time: 13ms
memory: 18684kb

input:

2000 1000
987 273 159 655 595 381 773 454 26 392 984 342 105 953 542 938 646 747 35 853 243 589 526 82 419 133 678 196 675 858 428 159 51 184 659 421 73 537 900 219 301 442 608 151 202 321 816 371 314 525 397 339 444 457 799 695 491 411 545 842 960 484 665 326 528 93 377 606 423 703 345 737 788 532 ...

output:

678288 10

result:

ok 2 number(s): "678288 10"

Test #139:

score: 0
Accepted
time: 12ms
memory: 18516kb

input:

2000 100000
64345 80472 98669 55549 66027 16156 11840 84341 25169 10440 506 53785 55420 68774 6232 29775 8327 13568 39274 5919 54638 89710 73925 74769 82639 60123 94967 71832 39916 99857 57878 37926 15625 10155 63782 99600 12797 76504 60813 47569 14759 78016 37567 93500 86560 87493 22381 3421 1916 9...

output:

645898 2

result:

ok 2 number(s): "645898 2"

Test #140:

score: 0
Accepted
time: 14ms
memory: 19256kb

input:

2000 47008
42279 2402 91981 33412 50761 2592 83804 28481 40514 52226 14057 58589 63735 27618 90851 18186 34278 92409 5899 29123 28688 34920 72337 9178 76857 27036 97456 83576 18139 66608 90649 15514 2740 29201 32634 87295 21486 78062 57839 30194 67399 92850 21876 54997 39984 34653 98256 20736 39295 ...

output:

1000000 434315991

result:

ok 2 number(s): "1000000 434315991"

Test #141:

score: 0
Accepted
time: 8ms
memory: 19236kb

input:

2000 100000
44560 8267 85293 35623 11148 64681 80115 96970 15447 94012 92368 98633 88117 62116 15881 41837 95469 71250 61632 65780 78392 80132 59854 84002 71075 29190 64704 81866 72017 68599 88178 93104 41162 48246 66246 10230 54521 68726 19625 12820 84797 42923 6185 40841 28649 30506 98477 73292 11...

output:

677251 440

result:

ok 2 number(s): "677251 440"

Test #142:

score: 0
Accepted
time: 9ms
memory: 18764kb

input:

2000 488252974
65249386 341970214 192185771 269283589 1227035 172304392 207755044 412400355 203989140 103029596 385053059 99543380 80805991 352181413 208737753 152989945 178391676 63016835 297927539 330037766 347884920 498549508 52889879 473546242 236987492 169635430 154382235 494353803 335496665 45...

output:

706588 2

result:

ok 2 number(s): "706588 2"

Test #143:

score: 0
Accepted
time: 8ms
memory: 19140kb

input:

2000 500000000
467330294 207080056 299856116 32963073 276046519 443964124 5577270 122565261 453698006 245038492 59942632 22413396 250324764 346749108 194914201 247266586 232676747 474222937 82008990 186664382 278490675 217112736 222916136 142318972 497206237 310247883 430505586 144669801 398505422 2...

output:

694015 8

result:

ok 2 number(s): "694015 8"

Test #144:

score: 0
Accepted
time: 4ms
memory: 19416kb

input:

2000 500000000
166412142 480221669 407526462 93643498 347866944 33721050 301365843 242795593 90342388 297112814 437831265 353315185 216844478 341316803 478091591 341543226 286961818 498493522 479154926 451322770 27193625 253773160 95941452 311091704 462457695 42828563 319693420 91986741 74578662 147...

output:

677489 4

result:

ok 2 number(s): "677489 4"

Test #145:

score: 0
Accepted
time: 8ms
memory: 19236kb

input:

2000 920080536
565117304 125814888 586097543 963853833 196590927 534233702 214202996 417607347 217344493 833980730 579124249 288058518 353693152 141368 931819726 549915952 94544449 722578470 980780801 815164329 127100054 282936210 827026159 411803214 977935317 679355574 614170675 304267823 705937537...

output:

744399 2

result:

ok 2 number(s): "744399 2"

Test #146:

score: 0
Accepted
time: 8ms
memory: 19136kb

input:

2000 1000000000
788436877 974052673 829967590 765398156 269539766 537102347 622553467 666401120 874506660 16535909 781745304 155828426 850228329 124196813 779920379 156915212 379354853 68702931 983430000 113473197 140287884 730520408 843204556 903083650 638242565 250586437 440501645 455899967 741443...

output:

669612 2

result:

ok 2 number(s): "669612 2"

Test #147:

score: 0
Accepted
time: 8ms
memory: 18804kb

input:

2000 1000000000
421821866 527323166 368804927 566942480 678925093 834938283 104532865 915194893 163072606 977752725 320802846 433663751 273134577 543219551 964457522 353849056 664165257 119860101 649642710 411782067 112006517 136635407 859382954 762960305 372178740 158253789 971865323 943968600 4083...

output:

671264 20

result:

ok 2 number(s): "671264 20"

Extra Test:

score: 0
Extra Test Passed