QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#407803#8317. 搬东西Shui_Dream100 ✓449ms35580kbC++232.4kb2024-05-09 11:19:192024-05-09 11:19:20

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms
memory: 3816kb

input:

11 10
3 1 3 8 4 3 2 1 2 1 1

output:

4

result:

ok 1 number(s): "4"

Test #2:

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

input:

18 98
7 95 3 1 5 5 96 4 1 5 4 3 1 1 3 32 2 5

output:

3

result:

ok 1 number(s): "3"

Test #3:

score: 5
Accepted
time: 1ms
memory: 3820kb

input:

15 34
10 3 3 6 10 2 7 5 5 8 7 5 2 7 4

output:

3

result:

ok 1 number(s): "3"

Test #4:

score: 5
Accepted
time: 1ms
memory: 3804kb

input:

15 13
13 8 3 10 9 3 5 4 5 5 10 1 10 6 7

output:

9

result:

ok 1 number(s): "9"

Test #5:

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

input:

20 100
33 11 19 6 7 7 4 7 9 7 20 18 18 1 8 3 11 19 32 5

output:

3

result:

ok 1 number(s): "3"

Test #6:

score: 5
Accepted
time: 1ms
memory: 3760kb

input:

20 21
17 7 3 6 3 15 5 5 1 10 8 20 14 8 13 18 20 20 14 20

output:

13

result:

ok 1 number(s): "13"

Test #7:

score: 5
Accepted
time: 1ms
memory: 3816kb

input:

14 50
3 26 5 16 2 26 1 22 25 40 46 19 24 4

output:

6

result:

ok 1 number(s): "6"

Test #8:

score: 5
Accepted
time: 1ms
memory: 3800kb

input:

11 11
6 3 2 4 2 5 7 7 8 10 2

output:

6

result:

ok 1 number(s): "6"

Test #9:

score: 5
Accepted
time: 1ms
memory: 3768kb

input:

13 8
4 6 6 1 4 5 3 8 4 4 8 1 5

output:

9

result:

ok 1 number(s): "9"

Subtask #2:

score: 25
Accepted

Dependency #1:

100%
Accepted

Test #10:

score: 25
Accepted
time: 2ms
memory: 3948kb

input:

435 287609033
107292847 20 94 88 69 77 13821139 11 82 90 85 21 50 93 79 47 46 69 49 4 75 25 79 15 66 158695077 57 76 54 22 94 5 56738718 142113886 39 73 86 121581550 49 61 72 28 34 78 16 84 29 39 91 85 73 29 16 21 55 15 185303189 187942831 54 95 96 60467842 36 73 188313126 69 98 26 98 51 36 47 5 15 ...

output:

36

result:

ok 1 number(s): "36"

Test #11:

score: 25
Accepted
time: 2ms
memory: 3992kb

input:

483 376578048
5451 60287817 34805 28592 75522 159924136 14998 62233 86173 99602 82748 13097 20333 69220 354503988 98952 32131 297383613 45888 10926 28797 40837 11692 292699053 16494 38363 12962 63699 42809 8556 275299186 31492 85075958 97252 87867 36018 32260 51919 37827 93536 53687 5458 51875 7478 ...

output:

46

result:

ok 1 number(s): "46"

Test #12:

score: 25
Accepted
time: 2ms
memory: 4000kb

input:

460 885452077
1571693 1079548 4482890 8506690 102957144 3661682 358470 8576126 1533787 9754740 4379504 3602931 9769448 745550 4302630 6729296 2506152 2467478 7783920 195537606 9861067 5469593 9408407 9644674 2075536 8973907 172439879 3599011 6847146 754552 9477439 2648676 911347 6016915 205827538 40...

output:

51

result:

ok 1 number(s): "51"

Test #13:

score: 25
Accepted
time: 3ms
memory: 4060kb

input:

500 1000000000
9361756 5886241 2298056 1745320 4687650 4985896 729707871 1879929 785935 9177381 6762757 8542390 4252737 4775998 9069704 2564890 657267490 788191774 6021786 1203971 1195898 5202437 432331934 5915324 7269128 4070952 9705641 6818846 7142827 5091986 2377319 3515185 3670160 9416518 526433...

output:

48

result:

ok 1 number(s): "48"

Test #14:

score: 25
Accepted
time: 2ms
memory: 3960kb

input:

480 452053097
29489807 91826875 51260834 2630986 13212908 31820320 55069442 69069590 36200378 44440584 93551960 21281617 11641723 99002815 38685875 52282523 11081902 19936771 386705247 18187322 1029226 159872579 98995469 71756467 90100005 73468310 29252660 59015661 91165139 772433 70530399 98176118 ...

output:

87

result:

ok 1 number(s): "87"

Test #15:

score: 25
Accepted
time: 2ms
memory: 4056kb

input:

431 924772332
90827466 34570175 23611200 10221267 33480048 11723911 753351615 79874005 50272854 53174734 77425184 21109176 11518202 91611199 81907252 11577380 88636536 245673210 22830730 28880076 280825923 6605540 27533086 70630171 21934252 82829898 48054106 73049759 97745554 738870845 69729139 8616...

output:

59

result:

ok 1 number(s): "59"

Test #16:

score: 25
Accepted
time: 2ms
memory: 4024kb

input:

454 188751406
92422599 83401875 13994062 82526193 96682159 86989393 81291357 39873522 188079732 83225180 21873710 90318377 19743905 22864055 91061683 71176466 120726832 571591 99932197 76217662 14805767 39995521 146362917 35101046 72951762 68195071 16859446 66848263 68434848 14716400 34539610 393010...

output:

142

result:

ok 1 number(s): "142"

Test #17:

score: 25
Accepted
time: 2ms
memory: 4164kb

input:

498 542732613
185582026 412264949 488493239 535356253 70505587 511964408 36717123 169307 291958304 354654565 34731905 242181974 463345061 14120944 234637801 276455812 538166934 439949051 124618112 335047450 521073652 162931902 395516624 22217281 448368219 452247845 386360532 162113656 245281456 1843...

output:

298

result:

ok 1 number(s): "298"

Test #18:

score: 25
Accepted
time: 2ms
memory: 4148kb

input:

466 28310700
14292652 9924973 23613983 2701229 21823199 6741741 16601000 21437874 25957640 4435319 22126459 20132627 13589878 4838864 5390775 7384729 3554363 27399652 11997943 26812752 18935869 17809730 12775025 22392052 14710037 27979870 22115670 3161644 4519003 12469392 21595997 3135606 10247856 1...

output:

264

result:

ok 1 number(s): "264"

Subtask #3:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #19:

score: 20
Accepted
time: 10ms
memory: 5388kb

input:

2555 538346582
77773 91107 68984 97281 37767 4535 63408 77631 48046 21265 48446 397746003 232098732 111440953 15084 196840719 37881 76447 89204 99782 55391 406461598 65146 38842 15031 51145 61413 82797 44741 46486 8361 86806103 72220 323493004 522506112 16100 527201988 218652848 8622 377955656 74001...

output:

270

result:

ok 1 number(s): "270"

Test #20:

score: 20
Accepted
time: 12ms
memory: 5292kb

input:

2448 434345293
372873595 400958410 143983411 368368769 83565972 54179266 216606258 396040136 117255901 196076408 309764415 188988542 342468735 267684892 385239032 370579084 423503582 253617974 44393938 149572977 130984202 83443190 293882715 169301758 330057941 177654383 422671831 417039740 32022929 ...

output:

1446

result:

ok 1 number(s): "1446"

Test #21:

score: 20
Accepted
time: 11ms
memory: 5372kb

input:

2859 343626486
32588 6374 14823 47515 58672715 77534 54922 42432 29931 95812 17913 83538 1882 11290 98343 41221 98646 43025 303438500 490 34544 98597 81465 94568 22675 67484 78965 8548 333283323 64897 33515 78775 79305 25597 73869 76901 74845 74897 53374 14459 71327 268209520 70189 17075 84517 31962...

output:

285

result:

ok 1 number(s): "285"

Test #22:

score: 20
Accepted
time: 13ms
memory: 5456kb

input:

2791 174028781
682411 681637 240713 161418 82842 581528 15969 133512 175796 244330 118520638 167138 100234 551817 249530 25370793 157702667 904425 870707 165534 149422 362590 775441 830087 895968 921440 921285 19917663 617229 879178 985502 266420 72146486 762937 962842 845156 4134 648335 711021 6791...

output:

279

result:

ok 1 number(s): "279"

Test #23:

score: 20
Accepted
time: 13ms
memory: 5516kb

input:

3000 1000000000
16029 48759 587600 789920 718521 393786 585982 499111 959752 273069385 899622 462779 441110 884133 604073 522750 621503092 840160 978139 429258 493676 103536 914652 977197449 695700 131984 25618 519705 326785920 102131 374182 94822 910218 229046 892745 210312 80097 28427 491564 92280...

output:

331

result:

ok 1 number(s): "331"

Test #24:

score: 20
Accepted
time: 6ms
memory: 5336kb

input:

2442 447068278
7632332 1896996 1977099 2842794 822601 3437070 317349870 2505238 130703583 8270561 2811498 703226 370454359 8128130 20280676 1083701 147326334 9598916 1368072 235866106 4724726 164111626 2430404 6610667 8046943 5038706 3749290 9925086 6531455 390265886 928978 1180228 368068898 8451489...

output:

241

result:

ok 1 number(s): "241"

Test #25:

score: 20
Accepted
time: 13ms
memory: 5308kb

input:

2462 114045922
1129474 7160619 2606637 5962953 9978661 4988198 86854215 2474947 8776439 8104395 244703 4946292 7596134 283147 5220289 62953239 9099909 1431982 842396 742215 750202 303171 60683579 77210 7989577 1138454 1935537 8892065 87199772 7090639 428961 2792468 52835642 4204349 993413 3494191 27...

output:

329

result:

ok 1 number(s): "329"

Test #26:

score: 20
Accepted
time: 13ms
memory: 5360kb

input:

2682 829140393
7650512 5022738 6100120 176241 585555272 4179807 7964298 5019071 8138609 5311124 5559613 718666106 2282210 5845700 4074716 5623002 2255847 4671140 7983926 980221 6703355 5504499 4010993 5083069 9112255 5179828 393806 2733551 16866443 1704708 512468 9672992 2706843 2562191 6558512 7389...

output:

272

result:

ok 1 number(s): "272"

Test #27:

score: 20
Accepted
time: 12ms
memory: 5436kb

input:

3000 1000000000
45199229 1746607 70409755 47060860 395989735 38178633 7055232 280893128 67343720 717861448 552502 67091386 36643050 85792337 377939061 10674946 446700727 74823384 14173441 22105583 66565289 75662522 35708725 18046923 61756047 21599316 883067061 33806096 69778560 36174340 64664826 207...

output:

404

result:

ok 1 number(s): "404"

Test #28:

score: 20
Accepted
time: 10ms
memory: 5432kb

input:

2733 12304387
387253 6322108 9163507 11669912 3863941 11497888 8637872 8239643 10659393 2515909 8494294 8817367 442579 9808726 3584319 1723468 7705581 5710026 8892878 7786660 9059897 11807292 3144437 9821300 2829294 4315793 3049993 2064269 11169486 1769476 5568497 9185062 11849470 2250468 7778036 47...

output:

1596

result:

ok 1 number(s): "1596"

Subtask #4:

score: 10
Accepted

Test #29:

score: 10
Accepted
time: 143ms
memory: 8680kb

input:

50000 10
1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 7 1 1 5 1 1 2 6 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 6 2 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 8 1 1 1 7 1 1 8 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 10 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 ...

output:

9503

result:

ok 1 number(s): "9503"

Test #30:

score: 10
Accepted
time: 107ms
memory: 7640kb

input:

45649 8
7 8 5 1 6 7 8 5 6 1 2 1 8 1 3 8 3 1 6 2 7 5 3 1 7 5 1 5 4 3 7 2 1 3 4 1 6 2 3 7 5 7 3 7 1 2 1 4 4 3 2 1 7 4 5 7 4 5 2 5 6 7 2 8 8 6 1 1 3 5 2 2 2 7 6 4 1 8 3 7 7 6 5 3 3 6 4 4 6 7 6 2 4 6 1 4 6 5 8 6 6 5 4 8 5 8 3 4 3 2 8 8 6 3 8 1 7 7 3 8 1 7 5 3 1 8 1 8 4 8 8 8 6 8 8 4 4 8 3 2 8 7 5 4 6 3 ...

output:

27877

result:

ok 1 number(s): "27877"

Test #31:

score: 10
Accepted
time: 46ms
memory: 5568kb

input:

40613 2
1 1 1 2 2 1 1 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 1 1 1 ...

output:

21990

result:

ok 1 number(s): "21990"

Test #32:

score: 10
Accepted
time: 29ms
memory: 4792kb

input:

40640 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

40640

result:

ok 1 number(s): "40640"

Test #33:

score: 10
Accepted
time: 139ms
memory: 8760kb

input:

50000 10
2 2 2 1 3 2 2 2 1 1 1 2 1 2 7 2 2 2 1 10 1 1 2 2 1 2 5 6 1 1 1 2 6 2 1 2 2 2 1 2 2 2 1 1 1 1 1 1 1 2 1 1 1 1 2 2 2 2 2 9 2 2 2 1 8 1 1 2 1 1 1 2 2 1 1 2 1 2 1 6 1 10 1 2 1 2 1 1 2 1 2 2 1 1 1 1 1 1 2 1 2 2 2 1 4 8 8 2 1 1 7 1 2 1 2 1 1 1 1 2 1 2 1 2 3 2 1 1 1 2 2 2 2 1 2 1 2 2 1 2 1 2 1 2 1...

output:

11503

result:

ok 1 number(s): "11503"

Test #34:

score: 10
Accepted
time: 122ms
memory: 7936kb

input:

45088 10
3 3 2 1 3 3 3 1 2 2 3 2 1 1 3 3 1 8 3 1 8 1 1 1 1 2 3 3 10 1 2 1 3 1 3 2 4 1 2 2 1 1 3 3 3 1 1 3 2 2 3 3 1 3 1 3 1 2 8 2 2 1 2 1 3 2 2 3 2 10 3 3 3 3 2 2 3 10 3 2 1 1 1 1 2 1 7 1 1 3 1 10 1 3 2 3 2 1 1 2 2 2 3 9 1 1 3 3 4 1 9 1 9 1 2 1 2 3 2 1 8 1 1 2 3 3 2 2 1 1 1 3 2 3 3 7 3 2 8 2 2 2 1 1...

output:

12733

result:

ok 1 number(s): "12733"

Test #35:

score: 10
Accepted
time: 98ms
memory: 7312kb

input:

42193 8
1 2 3 6 2 5 6 3 2 3 1 3 2 3 1 2 1 2 3 3 1 3 2 1 1 2 1 1 1 2 1 2 3 6 2 2 2 2 3 2 3 2 2 3 3 2 3 3 2 1 6 2 3 1 1 2 5 3 1 4 3 3 3 3 2 3 2 3 1 2 6 3 1 3 2 3 3 2 2 2 7 1 1 2 3 2 1 3 2 1 4 1 1 3 1 3 3 3 2 1 1 3 2 2 6 1 1 2 1 4 1 1 1 3 2 3 1 2 1 2 2 2 2 2 3 1 2 2 2 5 3 2 1 2 1 1 1 1 3 2 1 1 7 3 3 6 ...

output:

14474

result:

ok 1 number(s): "14474"

Test #36:

score: 10
Accepted
time: 63ms
memory: 6132kb

input:

49156 2
2 2 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 2 2 1 1 1 2 1 1 1 2 2 2 2 1 2 1 1 2 1 1 2 1 2 2 2 2 2 1 1 1 1 2 2 2 1 1 2 2 2 1 2 1 1 1 2 2 1 2 1 1 1 1 2 2 2 1 2 1 1 1 1 1 1 2 2 1 1 1 2 2 2 2 1 1 1 1 2 1 1 1 1 2 2 1 2 2 2 2 1 1 1 1 1 1 2 1 1 2 2 1 1 1 1 2 2 2 2 1 1 1 1 1 2 2 1 2 2 2 1 1 1 1 2 1 2 2 1 1 2 ...

output:

36736

result:

ok 1 number(s): "36736"

Test #37:

score: 10
Accepted
time: 84ms
memory: 6704kb

input:

49055 3
2 3 3 2 3 3 2 3 2 2 3 3 3 1 1 3 2 3 3 1 1 2 2 1 1 3 1 1 1 2 3 3 2 3 2 2 1 3 2 2 3 3 2 3 2 1 2 1 2 2 1 1 3 1 1 3 2 1 1 2 3 1 3 3 2 2 3 1 3 1 3 1 3 3 1 2 1 1 3 1 3 3 3 2 3 1 1 1 3 1 3 1 1 1 2 1 2 3 1 1 1 2 1 3 2 2 2 2 2 3 3 3 1 3 3 2 2 1 2 1 3 3 3 1 3 2 3 3 1 3 3 1 2 2 3 1 2 2 1 3 1 3 3 2 2 1 ...

output:

38145

result:

ok 1 number(s): "38145"

Test #38:

score: 10
Accepted
time: 127ms
memory: 8540kb

input:

49122 10
1 10 6 6 1 5 2 5 1 2 4 9 10 5 1 2 1 7 8 4 2 3 7 10 8 4 6 6 9 1 6 9 2 8 2 4 6 4 3 9 8 10 6 1 1 7 9 5 3 2 7 7 1 6 1 9 8 10 6 9 8 2 4 10 4 2 3 8 1 8 7 10 5 8 2 3 2 9 5 10 9 2 4 6 2 6 6 3 7 8 4 7 3 4 4 5 9 1 2 2 8 8 4 2 2 8 10 10 9 7 1 8 1 2 4 5 10 3 9 10 2 1 8 2 3 2 4 2 8 7 6 7 7 10 6 5 10 7 8...

output:

30968

result:

ok 1 number(s): "30968"

Subtask #5:

score: 40
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Test #39:

score: 40
Accepted
time: 297ms
memory: 21652kb

input:

49315 364856432
386 815 273087254 314438947 379 325 248 1778 410 1260 1400 438 285 21 731 1283 335 118340462 480 588 439 1341 797 1438 1685 1338 1269 663 282751773 187 154203448 640 1595 1508 1123 1679 1838 201 1409 499 1737 174 1431 711 78 994 1398 1524 201 1595 860 423 637 1182 128578330 1931 598 ...

output:

4777

result:

ok 1 number(s): "4777"

Test #40:

score: 40
Accepted
time: 449ms
memory: 35580kb

input:

50000 1000000000
28113332 616132723 834011967 154553261 917823446 879977788 105487259 871304307 379842080 295554864 758521346 87477501 304455707 156558965 663676709 485438373 853924182 912729910 639474707 273821882 783740386 949438418 180411403 819971591 921392009 997273194 703741596 331572105 84987...

output:

28937

result:

ok 1 number(s): "28937"

Test #41:

score: 40
Accepted
time: 303ms
memory: 25908kb

input:

49397 434433422
2615 7392 223417743 420013834 4557 7894 901 15775081 432003104 5053 4980 7225 1328 4907 6433 4217 5811 5945 2351 3464 749 4617 389483824 5034 3571 6359 9569 9691 3786 185726963 2661 2037 1793 9381 2783 105 145581179 323 52 7685 255277167 8137 8218 844 8129 1135 3944 1919 7156 6896 36...

output:

4906

result:

ok 1 number(s): "4906"

Test #42:

score: 40
Accepted
time: 410ms
memory: 32796kb

input:

47127 10472907
4255973 38729 15503 1747064 93686 39386 72160 94071 1957717 1061 72380 10368767 2865598 86211 72140 68176 49134 6464 38860 8238905 80851 44918 16294 49523 79916 91561 18189 5551451 19187 75304 71535 9196433 87297 22721 18927 70671 8807 44880 5988 99767 6471 11007 74231 1624280 92262 4...

output:

4672

result:

ok 1 number(s): "4672"

Test #43:

score: 40
Accepted
time: 317ms
memory: 31272kb

input:

43677 778549566
21404 86760 18377 13544 74060 919 76809 80950 4473 22457 358169155 638267056 2264 37673 2614 24780 45837 334117014 73298 485574946 66758 3979 7560 49368 33934 3203 36057 33083 73173 32638 92067 83959 29649 47509 41437 5218 32012 203696408 46709 270 64357 98693 80811489 12553 92189 81...

output:

4194

result:

ok 1 number(s): "4194"

Test #44:

score: 40
Accepted
time: 372ms
memory: 33976kb

input:

47161 754331281
620181 393514 482164 866312 456898 197301 880905 944282 570180 167942 67687 803597 4660 330546213 87201 943026 435370492 98168 347769 337030031 586165 827076 612192 300809 406116 869055 110121 549437298 738208896 497453181 656086 97276 961450 289545 108142 313336 29487 8755309 624101...

output:

4575

result:

ok 1 number(s): "4575"

Test #45:

score: 40
Accepted
time: 383ms
memory: 35420kb

input:

50000 1000000000
369012 820432 90784 877387 749986 299216 768737 982438 933026 198835262 204556 253908 983391 859221927 97210 760543 669027 583745 557354 352956726 270216673 737531579 187737 321273307 562661013 680164 697777 102053368 528876 988052880 303669 109435 52691661 480699 488535 184758 1025...

output:

4828

result:

ok 1 number(s): "4828"

Test #46:

score: 40
Accepted
time: 363ms
memory: 31876kb

input:

42509 515130337
6754039 7906414 748965 6565827 5868266 8109999 2157374 3282365 8739212 3911973 2605445 465144487 3668097 310139993 4641415 3977009 7361444 1182668 488837673 6377569 5245320 3383912 5761929 511569688 4895633 5333820 8663385 1722501 6492953 5122082 76783 5513919 6382605 6041488 5330216...

output:

4447

result:

ok 1 number(s): "4447"

Test #47:

score: 40
Accepted
time: 366ms
memory: 32584kb

input:

43658 258465440
54053674 254418593 176351596 133923964 26358238 238133408 87821059 185762006 95134187 36500825 241731897 251303859 208872770 193417621 174746420 184599385 30932779 243638638 95339197 173747365 131679653 137702694 238178701 108644662 36861679 5678566 181992935 132048176 113829113 1045...

output:

25143

result:

ok 1 number(s): "25143"

Test #48:

score: 40
Accepted
time: 401ms
memory: 34116kb

input:

47054 168877172
114144846 71743693 154943707 152293450 91372561 122333774 130104314 40231655 102320396 67416823 65966051 37313230 153563569 24526982 72166175 24303252 30173824 86372868 129488984 45232655 140091809 149085705 34730100 167613956 73480723 6609165 39541646 14025166 39584628 44730620 1001...

output:

27106

result:

ok 1 number(s): "27106"