QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#219610#1132. Financial Reportznstz53 1753ms16384kbC++202.8kb2023-10-19 16:45:192023-10-19 16:45:20

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 14
Accepted

Test #1:

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

input:

1 1
314159265

output:

1

result:

ok single line: '1'

Test #2:

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

input:

1 1
0

output:

1

result:

ok single line: '1'

Test #3:

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

input:

1 1
1000000000

output:

1

result:

ok single line: '1'

Test #4:

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

input:

2 1
299792458 299792458

output:

1

result:

ok single line: '1'

Test #5:

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

input:

2 1
141421356 173205080

output:

2

result:

ok single line: '2'

Test #6:

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

input:

2 1
244948974 223606797

output:

1

result:

ok single line: '1'

Test #7:

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

input:

2 2
299792458 299792458

output:

1

result:

ok single line: '1'

Test #8:

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

input:

2 2
141421356 173205080

output:

2

result:

ok single line: '2'

Test #9:

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

input:

2 2
244948974 223606797

output:

1

result:

ok single line: '1'

Test #10:

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

input:

3 1
500000000 1000000000 0

output:

2

result:

ok single line: '2'

Test #11:

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

input:

3 2
500000000 1000000000 0

output:

2

result:

ok single line: '2'

Test #12:

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

input:

4 1
0 1000000000 200000000 500000000

output:

2

result:

ok single line: '2'

Test #13:

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

input:

4 2
0 1000000000 200000000 500000000

output:

3

result:

ok single line: '3'

Test #14:

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

input:

5 2
111111111 888888888 555555555 222222222 444444444

output:

2

result:

ok single line: '2'

Test #15:

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

input:

19 1
876813783 876813783 294665595 1000000000 515198511 876813783 876813783 294665595 403855901 439947219 439947219 403855901 581007064 294665595 1000000000 581007064 294665595 865289906 865289906

output:

5

result:

ok single line: '5'

Test #16:

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

input:

17 2
49121102 449215299 18829293 449463830 765492419 440501697 233785699 50699732 569054461 105188844 983737936 877900994 0 44809615 361020433 74987201 725464354

output:

5

result:

ok single line: '5'

Test #17:

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

input:

15 3
807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796 807337796

output:

1

result:

ok single line: '1'

Test #18:

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

input:

20 7
733581184 733581184 0 205928229 0 733581184 1000000000 733581184 0 815970650 975939523 0 815970650 975939523 0 205928229 0 733581184 205928229 815970650

output:

5

result:

ok single line: '5'

Test #19:

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

input:

18 12
1000000000 358612551 1000000000 358612551 358612551 358612551 358612551 1000000000 1000000000 1000000000 358612551 358612551 1000000000 1000000000 358612551 1000000000 1000000000 358612551

output:

2

result:

ok single line: '2'

Test #20:

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

input:

20 20
802421546 601860856 909073419 815745406 913824895 924761528 954389636 774128549 427176220 23722581 439396497 59191904 121848351 774320268 817458024 565828491 890339952 82761751 717137276 524535907

output:

6

result:

ok single line: '6'

Test #21:

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

input:

20 2
220907318 325117564 759996279 361226977 713619929 530965981 367577457 488411054 555070688 620059582 541892208 949650763 645304844 727718360 709566813 803811825 110264462 960815323 875849635 450666865

output:

10

result:

ok single line: '10'

Test #22:

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

input:

20 4
920699809 20405458 430167187 323905322 321816206 337791282 869436958 505338540 45509543 532042224 672842133 816481120 854290279 948611594 979068279 996148973 674793874 347773693 320013346 759492294

output:

11

result:

ok single line: '11'

Test #23:

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

input:

20 1
10000000 60000000 110000000 160000000 210000000 260000000 310000000 360000000 410000000 460000000 510000000 560000000 610000000 660000000 710000000 760000000 810000000 860000000 910000000 960000000

output:

20

result:

ok single line: '20'

Test #24:

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

input:

20 1
970000000 920000000 870000000 820000000 770000000 720000000 670000000 620000000 570000000 520000000 470000000 420000000 370000000 320000000 270000000 220000000 170000000 120000000 70000000 20000000

output:

1

result:

ok single line: '1'

Test #25:

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

input:

16 5
68514423 410103741 591567982 865691960 982387008 223996512 306149309 324123848 352045607 927590130 238419389 252822214 452213108 539870292 860882612 965882206

output:

9

result:

ok single line: '9'

Test #26:

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

input:

17 4
22790108 220864673 248053769 404589265 637574960 166412775 260226295 262479043 286448651 300001992 734205739 58675918 181211505 263369364 299892200 509157732 867133240

output:

9

result:

ok single line: '9'

Subtask #2:

score: 14
Accepted

Dependency #1:

100%
Accepted

Test #27:

score: 14
Accepted
time: 3ms
memory: 8252kb

input:

400 1
697625071 338955244 701273756 765293932 12805194 46984119 775140965 390552579 875281333 950702147 361444232 680144638 917418512 747923326 543035419 899203308 659270340 218742714 484689980 866434940 270117732 538163289 665365203 226080481 734351408 300250974 824534838 56953777 250622631 4998775...

output:

15

result:

ok single line: '15'

Test #28:

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

input:

397 4
467705846 767740944 895438469 533795958 693293401 869030737 691890948 522874750 670064696 815950426 83220749 368503752 5886628 670367518 609376726 194811413 318102838 766625872 758649856 845072193 606306969 52285365 72714393 155785860 666438261 387383555 79107247 370372410 228320080 342363590 ...

output:

26

result:

ok single line: '26'

Test #29:

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

input:

375 7
419990450 226023065 518565144 389170913 6829200 997083989 55187689 570620839 206928279 344779139 772964274 597404515 211682354 376663678 431873380 459063765 949200561 855646588 968869829 258337829 459063765 389170913 877761657 893177314 949200561 914249958 155847450 195707470 313542363 6024787...

output:

30

result:

ok single line: '30'

Test #30:

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

input:

382 14
297641955 579261299 693365773 503834660 625185678 930401348 231126864 588719210 115995879 871663635 258093515 21599253 717037833 133866136 302501944 794309456 331324463 33313393 169169419 178114058 513684028 420634528 381201674 795038522 120614458 785418360 709760430 156406189 724382191 13433...

output:

33

result:

ok single line: '33'

Test #31:

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

input:

398 68
87296112 87296112 0 0 87296112 87296112 87296112 0 0 0 87296112 0 87296112 87296112 0 87296112 87296112 0 0 87296112 0 0 0 87296112 0 0 0 0 87296112 87296112 87296112 87296112 0 87296112 0 0 87296112 0 87296112 87296112 0 0 87296112 87296112 87296112 87296112 0 87296112 0 0 0 87296112 0 0 872...

output:

2

result:

ok single line: '2'

Test #32:

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

input:

400 400
313643918 524837714 454497606 202185266 437460102 990219224 516405597 233454847 415501995 729752658 126493633 349361696 745579115 265649159 131329130 891526222 924054909 942306716 304196292 299533653 551317273 576482438 187264127 512575413 296382331 880052159 639485797 822109205 525502039 92...

output:

37

result:

ok single line: '37'

Test #33:

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

input:

400 2
572992061 931760159 538911610 891579979 861642215 54327796 130767579 217152621 806772462 958998532 482498465 110236290 534509333 90384831 344203521 398544881 920189563 166667845 630221338 89304326 788119936 598881289 996249896 499062241 215002930 456126547 938742792 76742232 377279685 91368408...

output:

178

result:

ok single line: '178'

Test #34:

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

input:

400 6
32850957 474568476 227393309 630723698 167871732 354713013 389685651 299988790 967355970 965004350 715503841 467286086 498715418 471251794 460548737 517020574 748737219 244292652 90334581 755243526 495303468 333725872 857155431 190563758 754274079 750605544 808305303 937057193 418690406 968735...

output:

121

result:

ok single line: '121'

Test #35:

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

input:

400 8
79961857 576026118 16651375 879359072 193504323 569824876 634814541 871160695 511489526 173357034 97742195 84534766 954895737 964675532 544456288 68397614 125750383 789974450 428100633 274455301 851478710 380463960 686092199 325634643 617240385 320281317 103433469 850604969 887147210 652637705...

output:

81

result:

ok single line: '81'

Test #36:

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

input:

400 36
672509835 968244063 457843819 533220194 8063350 409206579 168978949 466574816 899087033 285953558 728053213 894434695 257073896 414052552 552097198 102236348 2414491 911600232 776967305 747095786 360363242 22141552 578403058 819697857 5849647 373314810 825058085 343112586 8395386 956557769 36...

output:

60

result:

ok single line: '60'

Test #37:

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

input:

391 5
15756643 28559248 17487648 28685063 41063081 16751972 11095509 23603424 24823382 7038374 41161660 18075846 20970076 12807907 26381790 18306742 40221542 46262836 44038516 35183563 35171512 39407822 32878890 52404899 22696539 57205882 38655319 49528464 49655633 29146099 43241199 55320605 4496007...

output:

130

result:

ok single line: '130'

Test #38:

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

input:

389 8
132932626 51483275 53053136 39473371 114679338 82014215 117871074 4578588 38886546 184183396 96824433 110271307 8869552 87165913 202416955 13377084 92703547 98501358 81507515 9116699 115752025 262825071 65150741 59092990 107677249 140705122 30582132 80644036 190412737 104863688 97316270 785163...

output:

72

result:

ok single line: '72'

Test #39:

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

input:

400 17
151095706 190975190 436755026 544554326 627550531 662975688 731354911 839795955 127584834 135440339 215656518 357864438 746751018 786782791 810927606 811210605 1237342 66583570 331360859 368102996 500057934 742456547 813503798 981487152 17041396 274598434 683481223 698445202 704291741 8901336...

output:

39

result:

ok single line: '39'

Test #40:

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

input:

400 26
919068014 915312027 877597208 861346503 861071054 802433166 769027385 749253388 747182416 736938102 716626759 709839569 693282274 676841819 642280286 621501313 616134084 612553098 477369992 409815828 362120372 324994216 312898769 278866725 267550910 230290918 198714023 159535083 145963617 144...

output:

12

result:

ok single line: '12'

Subtask #3:

score: 20
Accepted

Dependency #2:

100%
Accepted

Test #41:

score: 20
Accepted
time: 20ms
memory: 8400kb

input:

7000 1
894882663 687753860 274846006 785270210 3034342 194264610 291176506 356300576 120019831 305340082 101303261 801498371 440274687 761247865 857100563 398852968 963685664 414803100 659457692 531909044 617088521 745956160 841866618 606356828 951489050 862821239 183071512 867632063 206346442 96390...

output:

16

result:

ok single line: '16'

Test #42:

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

input:

6891 2
632527524 380090567 457881486 582901705 708262391 626697081 867421844 784051327 543701519 188202428 101402683 828650744 340629967 952806253 467068793 47484909 242849333 236919334 881161983 645230044 547203841 720367375 757188731 219094902 333520200 837043846 977837 372876193 773042618 6064653...

output:

61

result:

ok single line: '61'

Test #43:

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

input:

6947 5
0 606521094 606521094 71862996 833581144 71862996 606521094 0 71862996 0 0 71862996 606521094 606521094 71862996 606521094 0 71862996 833581144 0 606521094 71862996 606521094 833581144 71862996 606521094 0 71862996 606521094 606521094 606521094 833581144 606521094 71862996 0 71862996 71862996...

output:

4

result:

ok single line: '4'

Test #44:

score: 0
Accepted
time: 15ms
memory: 8424kb

input:

6082 17
653825844 95003719 232511819 282711510 413302615 295686021 729879996 390205014 704773361 41234297 927053886 125874319 684535027 787769423 447975483 725930843 29298948 192207929 861267968 748889787 265752982 748201966 993282254 185270081 794213726 137379742 968170538 583426317 278561844 67425...

output:

130

result:

ok single line: '130'

Test #45:

score: 0
Accepted
time: 16ms
memory: 8424kb

input:

6598 239
119845597 214713881 621450789 155237032 362833540 427146986 911580330 429805492 287020533 803270157 330531943 869240942 378374360 701999344 374194594 137325913 211388065 240199215 212418273 772905399 215550283 197154671 998482968 740996765 248290110 737918383 520172181 420153620 987228969 6...

output:

155

result:

ok single line: '155'

Test #46:

score: 0
Accepted
time: 21ms
memory: 8336kb

input:

7000 7000
878120849 707107263 545848166 957389012 415182409 616010725 489144426 366437303 96187160 829743578 588284055 89692724 148894245 722236778 454753205 869731774 227942653 969689769 882913893 344439431 959034671 911507934 610544102 228398651 580991988 147548958 877099070 940338556 942651766 10...

output:

155

result:

ok single line: '155'

Test #47:

score: 0
Accepted
time: 18ms
memory: 8344kb

input:

6700 3
278590013 12588909 958880531 247155375 380042332 373025120 894279121 25453788 191885364 700319075 357247233 726517884 592025671 927795034 790414908 512393766 121146395 101594668 850993017 20094136 153277941 426471417 914571733 257378911 756667582 63233739 335465243 790162055 158804185 2781735...

output:

3834

result:

ok single line: '3834'

Test #48:

score: 0
Accepted
time: 21ms
memory: 8320kb

input:

6800 7
704128693 234065385 172120190 718808373 620392552 972063868 84418881 649704234 488070112 12224911 827692119 840223369 767923697 84882056 346017250 597306318 875973576 896790035 367946936 795401539 924624576 164190602 612848948 246557796 695878609 668410588 894320416 56926549 529468578 9389639...

output:

1236

result:

ok single line: '1236'

Test #49:

score: 0
Accepted
time: 17ms
memory: 8368kb

input:

6900 35
450072458 945833108 213437623 912112388 985894141 186455424 359328402 476293022 625433483 723805554 378833024 917292930 464791730 128577839 175175834 180497438 579466933 911153055 201534372 169949982 299401590 316688282 432415476 119133990 520604741 575354077 794734809 709724209 678982039 52...

output:

276

result:

ok single line: '276'

Test #50:

score: 0
Accepted
time: 16ms
memory: 8348kb

input:

7000 68
532612757 527223309 335822658 593825853 417795604 2264523 268671227 666318862 460682554 922630283 15650021 724245039 952429216 462944193 190215750 428930202 430841267 480841752 493844310 168757618 280423325 549533863 876080714 501508186 792030638 552016853 645867171 479201045 792233395 98555...

output:

228

result:

ok single line: '228'

Test #51:

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

input:

7000 1
12371016 8610235 12925395 3165091 6966911 11327287 5049186 17141933 4501546 13209104 13110873 8144503 1588461 23954099 6678958 3618181 12158459 11941082 9211122 1971044 7133482 15319252 9892103 12928703 6904543 8704990 6713320 3185737 16950682 20043309 14338545 7075289 12980599 26058526 56502...

output:

217

result:

ok single line: '217'

Test #52:

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

input:

7000 2
72214509 129054035 57936632 37588781 21847484 19982056 52674224 94225753 247073840 36658623 5392933 129435716 289586017 135719622 42779872 10181692 104309873 334712429 18690144 65622212 87488882 68599904 109598208 92149674 55199635 106726324 77849583 65482911 23438019 4858238 168091315 310376...

output:

111

result:

ok single line: '111'

Test #53:

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

input:

7000 7
110338 479413 254382 729010 755017 561788 1378622 968942 1222542 1531947 1386814 2133421 1207310 2168019 2031279 2031846 1997685 2133510 2488581 2088526 2906032 3184421 3125430 3223973 3159361 4138311 3537975 3385416 3659566 3945523 4598674 4607925 4129777 4090764 4813146 4990584 4964286 5362...

output:

4043

result:

ok single line: '4043'

Test #54:

score: 0
Accepted
time: 11ms
memory: 8356kb

input:

7000 58
2900991 1055588 2399597 6142594 6181086 1808857 826500 8537340 2409664 7200602 1689042 2272979 2940795 102354 10332963 11754508 1461010 7247260 10277442 13361648 3877144 10992372 9570062 7670553 9121416 4305570 6820379 5620512 14691324 9550730 5468515 3818933 11979975 8111300 3109632 9400414...

output:

1121

result:

ok single line: '1121'

Test #55:

score: 0
Accepted
time: 20ms
memory: 8416kb

input:

7000 316
294291327 278108753 144036115 69606222 199317479 1409237 24677629 172814612 286057385 131747009 212302034 415887769 1523474 203796971 121516354 34438481 34892874 279537657 38843996 346920348 249062012 73577270 163223033 93533196 10276911 119511490 465241848 207696181 522797448 60403937 2476...

output:

220

result:

ok single line: '220'

Test #56:

score: 0
Accepted
time: 17ms
memory: 8260kb

input:

6953 307
2358163 54923986 78689040 184011021 253580116 289436715 349695004 377127530 413972065 419316830 430120611 519220523 548185667 624001566 656828754 746687724 773106933 778472491 814222959 832172554 838088251 868264391 889869687 900918350 927954019 997477453 23576089 59505438 59789546 15618395...

output:

176

result:

ok single line: '176'

Test #57:

score: 0
Accepted
time: 20ms
memory: 8364kb

input:

6986 59
30267579 114526919 245210016 295643487 361933372 447212121 472771088 524922966 611744621 636556557 658856037 666671065 699978432 730424683 750060133 892523422 930965374 987105849 993292938 48947611 153884610 162604789 176777279 191444673 237985496 403726785 407914282 415296823 415641800 4239...

output:

176

result:

ok single line: '176'

Test #58:

score: 0
Accepted
time: 10ms
memory: 8280kb

input:

7000 6997
415885 999929409 999896770 999400299 999163707 998994317 998963012 998668376 998646012 998458918 998351634 998085441 997755439 997504500 997434792 997192000 997090131 997086503 997047292 996874409 996775206 996747081 996729268 996716844 996599233 996338116 996020139 995913390 995525081 995...

output:

2

result:

ok single line: '2'

Test #59:

score: 0
Accepted
time: 10ms
memory: 8296kb

input:

7000 6998
81326 999994313 999939097 999888570 999842220 999636662 999566806 999480316 999048212 998947874 998251994 998099804 997551809 997469989 997426516 997315246 996850633 996665454 996489994 996396157 996170003 995829721 995619805 995573643 995417797 995394295 995301375 995248858 995166331 9949...

output:

3

result:

ok single line: '3'

Test #60:

score: 0
Accepted
time: 10ms
memory: 8320kb

input:

6810 295
163903 968076529 965947171 961243931 956895936 953825367 951583637 949848288 946878692 943337079 940835736 937314270 934299805 932552285 928858986 925759101 921861430 918345907 916386415 913461413 910477403 907364272 904849286 902042203 898062809 894579670 892279266 887649802 884946400 8813...

output:

24

result:

ok single line: '24'

Test #61:

score: 0
Accepted
time: 10ms
memory: 8324kb

input:

6810 296
364363 970268896 967154068 963380385 959868528 956963449 953758508 949841769 945709162 941659488 938241908 935471564 931953505 928521770 924058667 921097263 917855847 914813939 911311542 907656476 905352658 901171765 898895367 896078927 893785158 889172282 885948979 882092490 877449012 8731...

output:

25

result:

ok single line: '25'

Subtask #4:

score: 0
Time Limit Exceeded

Test #62:

score: 12
Accepted
time: 637ms
memory: 12932kb

input:

300000 1
285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 285899902 2...

output:

1

result:

ok single line: '1'

Test #63:

score: 0
Accepted
time: 1159ms
memory: 16272kb

input:

299971 1
213313757 312061773 790195557 213313757 0 790195557 30936680 832403554 312061773 30936680 0 213313757 329317874 329317874 0 0 329317874 329317874 0 213313757 329317874 790195557 832403554 832403554 329317874 312061773 832403554 832403554 329317874 329317874 312061773 790195557 790195557 790...

output:

7

result:

ok single line: '7'

Test #64:

score: 0
Accepted
time: 1577ms
memory: 16384kb

input:

299964 1
999391533 795527538 725929353 340564009 761636306 1000000000 266904585 105958508 549383838 340564009 431998269 141078858 236783723 651207509 554129129 514310143 802266954 185376130 366537845 883789079 688298181 621545068 692525271 555960625 415080461 468820678 149895819 709946893 415080461 ...

output:

15

result:

ok single line: '15'

Test #65:

score: -12
Time Limit Exceeded

input:

300000 1
548117244 559216957 507201469 40534874 269192764 516346951 183733704 869745777 781914589 551408564 699975473 735567843 438862496 240429620 67594019 153803925 72746062 343276550 121453383 412576614 208627475 771041507 950354624 832001069 221477371 192349583 674402432 552830114 73583781 83795...

output:


result:


Subtask #5:

score: 5
Accepted

Test #76:

score: 5
Accepted
time: 657ms
memory: 12864kb

input:

300000 300000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 ...

output:

1

result:

ok single line: '1'

Test #77:

score: 0
Accepted
time: 1369ms
memory: 16344kb

input:

299994 299994
799095588 515641284 851040998 371590609 581412250 114983578 870953189 65883574 114983578 546636247 675572999 416143410 763181943 799095588 564152084 521371792 455808474 799095588 870953189 839155298 684313832 605076527 675572999 219704773 684313832 372618560 875093839 41381734 11498357...

output:

85

result:

ok single line: '85'

Test #78:

score: 0
Accepted
time: 1640ms
memory: 16384kb

input:

299967 299967
55436237 815265051 726638198 232614559 766667170 589412354 222916094 881505795 351969379 185039621 500722663 929961726 12106126 527589224 131615979 740414875 483735803 961030961 685115515 630631167 847411283 606876236 853479813 969869770 978153478 951567612 284079913 655441675 23301827...

output:

1000

result:

ok single line: '1000'

Test #79:

score: 0
Accepted
time: 1753ms
memory: 16376kb

input:

300000 300000
501796523 297945585 927399536 440670566 495542465 80848196 28003478 540869900 992383926 48799286 967913195 572970230 215873915 538679144 853459893 70385046 947090071 440258092 348827388 912684078 519842448 805256446 548573509 148406683 373586707 74817790 975254107 599779344 939526125 4...

output:

1079

result:

ok single line: '1079'

Test #80:

score: 0
Accepted
time: 1526ms
memory: 15916kb

input:

300000 300000
863887522 425397042 713124005 773467613 489882500 437277345 139704179 557800941 215336895 161026143 927354002 294297768 165771354 512842947 537130652 175822358 136551779 148723787 79361863 416871734 644501573 743434372 557135739 94545556 438248865 141290994 550236652 94773186 137640908...

output:

119010

result:

ok single line: '119010'

Test #81:

score: 0
Accepted
time: 1719ms
memory: 15976kb

input:

300000 300000
261069220 62324615 942003105 79398536 881237922 660291668 342301327 287380444 258811488 67001231 625514902 572229121 938217290 244331276 295213680 418810760 250148739 681986353 93691086 258512344 334478574 842247076 289652772 232932429 900601662 770838744 512730335 879450985 799339736 ...

output:

4195

result:

ok single line: '4195'

Test #82:

score: 0
Accepted
time: 678ms
memory: 12808kb

input:

300000 300000
0 3000 6000 9000 12000 15000 18000 21000 24000 27000 30000 33000 36000 39000 42000 45000 48000 51000 54000 57000 60000 63000 66000 69000 72000 75000 78000 81000 84000 87000 90000 93000 96000 99000 102000 105000 108000 111000 114000 117000 120000 123000 126000 129000 132000 135000 13800...

output:

300000

result:

ok single line: '300000'

Test #83:

score: 0
Accepted
time: 655ms
memory: 12928kb

input:

300000 300000
1000000000 999997000 999994000 999991000 999988000 999985000 999982000 999979000 999976000 999973000 999970000 999967000 999964000 999961000 999958000 999955000 999952000 999949000 999946000 999943000 999940000 999937000 999934000 999931000 999928000 999925000 999922000 999919000 99991...

output:

1

result:

ok single line: '1'

Test #84:

score: 0
Accepted
time: 787ms
memory: 12860kb

input:

298001 298001
34832 79106 92233 41187 22866 85580 32085 65715 113345 78332 61133 129921 63730 69451 73358 152855 121615 76292 134438 105458 81917 6956 78765 162590 107750 159413 169971 115829 134528 131661 75589 115759 143187 97623 223499 186250 151499 168707 105513 236574 176390 103994 237829 22505...

output:

87419

result:

ok single line: '87419'

Test #85:

score: 0
Accepted
time: 1125ms
memory: 13028kb

input:

299000 299000
21957810 19402999 14174232 1584658 23477964 9979277 9164532 22323998 21003307 7443362 11819189 14661748 5803988 13596735 14666310 13535681 6460845 4003025 22441699 11909961 17684693 22096644 3463574 10789456 23133078 971943 20299903 1829387 6699896 17730801 1731607 17750814 7072208 903...

output:

4790

result:

ok single line: '4790'

Test #86:

score: 0
Accepted
time: 1386ms
memory: 13060kb

input:

300000 300000
18367526 39162436 46248746 53023958 58166604 60555798 128617672 154424917 171357763 178047421 179307707 186820325 216560886 238860292 244781586 284718360 288356348 337385547 341190169 345812663 352395427 353945030 361546670 367410573 386805472 420176531 495081945 500301991 502134964 51...

output:

1124

result:

ok single line: '1124'

Test #87:

score: 0
Accepted
time: 1149ms
memory: 12872kb

input:

300000 300000
998504892 998265952 997934075 997214275 997098713 996128339 995808017 995445379 994380027 994042007 994039412 993364233 993318976 992223668 991102126 990845586 987858596 987274453 986989530 986543852 986441325 986249054 986094401 985671270 985225560 984404578 984003136 983470456 983176...

output:

225

result:

ok single line: '225'

Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

0%