QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#472229#4928. Game With NumbersGuanYunchang100 ✓70ms35592kbC++17729b2024-07-11 15:09:312024-07-11 15:09:32

详细

Subtask #1:

score: 3
Accepted

Test #1:

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

input:

5 1
-5000111000 -5000222000 -15 5 2
5

output:

-10000333010

result:

ok single line: '-10000333010'

Test #2:

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

input:

1 1
4
4

output:

0

result:

ok single line: '0'

Test #3:

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

input:

1 1
-400000000000000
400000000000000

output:

-400000000000000

result:

ok single line: '-400000000000000'

Test #4:

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

input:

7 1
8 -1 -2 -9 5 3 -5
3

output:

-6

result:

ok single line: '-6'

Test #5:

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

input:

20000 1
-400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -40...

output:

-8000000000000000000

result:

ok single line: '-8000000000000000000'

Test #6:

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

input:

20000 1
400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 4000...

output:

0

result:

ok single line: '0'

Test #7:

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

input:

20000 1
-71369186400903 -21303325779163 -97827461296555 -214132697955012 -196334833414389 -301936452329789 -382174513230544 -367394070689093 -219406802243067 -9558534773577 -330359703722617 24771323320621 15923681295764 -301614836381862 28586018531489 -74683043436219 -124135635944320 -10648832568409...

output:

-3607837516244021000

result:

ok single line: '-3607837516244021000'

Test #8:

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

input:

20000 1
233033381367060 60861233878571 347212183474786 -84818202084737 -233828045019529 -393504707324582 353159561005753 -110028076672707 -114833693071773 199219445924758 166468140403099 54437974337128 302678275176822 -172792066320760 -39393106960029 -282021409620224 186724411035278 31109977318229 -...

output:

-51353784701877908

result:

ok single line: '-51353784701877908'

Test #9:

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

input:

20000 1
259276559450483 289816807429370 -346039222749615 27387823542230 375860934333993 -389352017613855 -311669269024107 321679266510763 -218467767104130 233355728228893 254623964396522 -367362969133313 266826918011316 -353725186724477 165128555208345 -200053627141839 79271694277875 253842426527683...

output:

-10720899572053746

result:

ok single line: '-10720899572053746'

Test #10:

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

input:

20000 1
-88391647220872 -175567802945542 -94353632762792 391060829840745 -206001066596400 -100611354221508 247179539541950 -380451534230002 -225503152746259 -144103704919724 170417897772421 174103054198099 -360195042352095 -392060207792192 -171502962366959 -38829126455905 16483057220004 381740942015...

output:

-454451956756021

result:

ok single line: '-454451956756021'

Test #11:

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

input:

8 1
5 3 6 6 4 4 4 5
3

output:

15

result:

ok single line: '15'

Test #12:

score: 0
Accepted
time: 6ms
memory: 3904kb

input:

20000 1
940322649 402959068 973703458 965399272 577786939 994768517 249675444 613581460 708982687 256093383 658262534 670606780 692856607 699530317 331043774 401861670 985171722 848569239 871522931 711432362 31877347 682027384 968965939 247043512 152194528 985888664 323630590 966824399 89552748 2601...

output:

2740638602

result:

ok single line: '2740638602'

Test #13:

score: 0
Accepted
time: 6ms
memory: 3884kb

input:

20000 1
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 100000...

output:

0

result:

ok single line: '0'

Test #14:

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

input:

20000 1
999999999 1000000000 1000000000 999999999 999999999 1000000000 999999999 1000000000 999999999 1000000000 999999999 999999999 999999999 1000000000 1000000000 1000000000 1000000000 999999999 1000000000 1000000000 999999999 999999999 1000000000 1000000000 999999999 999999999 1000000000 10000000...

output:

9950999990049

result:

ok single line: '9950999990049'

Subtask #2:

score: 6
Accepted

Test #15:

score: 6
Accepted
time: 8ms
memory: 4072kb

input:

20000 2
400000000000000 400000000000000 400000000000000 399999999999999 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 399999999999999 400000000000000 399999999999999 400000000000000 400000000000000 399999999999999 400000000000000 399999999999999 4000...

output:

3948000000000000000

result:

ok single line: '3948000000000000000'

Test #16:

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

input:

20000 2
182534839165186 70298512307304 389011527035061 17719186879755 173234501403065 299252387908755 156279428310107 -53468549407874 231983453347369 185595967982888 169571810287905 -112087920827993 365797541703357 -25349506737522 41239046248334 -148328819397811 80677342299710 50496185442999 3661562...

output:

408111326270709915

result:

ok single line: '408111326270709915'

Test #17:

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

input:

20000 2
218341929058610 113825266508950 121595505352950 -266649636489390 372691257506875 179007493239720 397838524296340 -277455533023185 -94840528158885 217347955859550 28622416443405 87805939966390 354614659862895 195207146310200 -268725390905755 -46296909528395 121209367951465 -367727040846525 33...

output:

0

result:

ok single line: '0'

Test #18:

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

input:

20000 2
395005725351249 208925533233056 370067432849697 -32292841344081 119705875252473 390006267156590 182021792361812 373942452150496 131651909751951 194868764687583 -310709963285496 185234270501602 -201237683305028 347662803738748 -395444715472187 -161459593569143 -364088659843392 207669567395887...

output:

184269549641235344

result:

ok single line: '184269549641235344'

Test #19:

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

input:

20000 2
116652975053630 60104321156340 -96584001368190 -266671454064060 307611122473040 228559133687280 -174863279198680 280205821685540 279981438604220 -158968079945690 142528833962150 101495202175140 370765018135660 372285686790750 175771120431660 -85711229337990 -342487498445017 156470713488120 -...

output:

89404597022232604

result:

ok single line: '89404597022232604'

Test #20:

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

input:

20000 2
231340216652324 256966723495253 55755970208939 18995037562238 40202115515306 205614422465647 198180465653526 352558308489362 130632690026657 136195592925145 376946112957128 363137818059883 35528831434382 216513118579719 270648824719091 190806044676988 279809284882951 28688494358407 184799626...

output:

2003248538023267678

result:

ok single line: '2003248538023267678'

Test #21:

score: 0
Accepted
time: 6ms
memory: 4444kb

input:

20000 3
384932075704620 -220975224710020 -394461881400459 28957402981307 204299530009879 71623823434060 -299465787509940 -220007273108480 -369774774356700 225587136214180 -103750665533375 -218791548517520 28155270728460 -340828350186510 -364760095356115 136719577403944 364648512931666 25141508616892...

output:

0

result:

ok single line: '0'

Test #22:

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

input:

20000 4
-6583097811612 -58132996113366 130226342358498 -302471354703242 218561225027708 -308216597111396 -158340791587048 -216481924427320 100851414823772 212081645535710 -317294934422216 348848551231538 -324839761355052 -244449111635152 258020432603870 236173097232520 84794272197096 67047545335560 ...

output:

0

result:

ok single line: '0'

Test #23:

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

input:

20000 8
298078912603948 78438259347402 140749094444945 -329303347640239 -129306754152072 -61765825553144 -339118683925351 11785340629263 -73607611340821 -33658379101816 140352907902536 -354864194969228 177325478536234 394946827562194 384388252688480 -70456837528868 -21018275840807 -151534523121821 -...

output:

0

result:

ok single line: '0'

Test #24:

score: 0
Accepted
time: 7ms
memory: 6512kb

input:

20000 16
69233061978954 -147966294027817 -240558896442060 -235260974626564 309475160079957 -59619632989203 -301430394786087 -70665682262788 7981361470899 11041937501121 -26367421920759 47625823667303 -200335262669798 -112775977481315 132294088175130 70903670726497 49458889057032 127590004718741 1576...

output:

0

result:

ok single line: '0'

Test #25:

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

input:

20000 25
363763542973680 -167600030582906 310093071175646 59174893357824 -141253067406780 -106893178642260 200037909607513 269961563805391 -338488119879423 296935773743224 -355712832617143 229344879039616 296859239171865 362363795132832 -125615040458625 -33160635035588 -150568599950325 1455276292579...

output:

0

result:

ok single line: '0'

Test #26:

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

input:

20000 26
-207202269203960 125486647242154 -114440821031491 -308313271805157 392235624328519 -242059134204221 -116032237680217 -44838758438362 306957677413745 335159672827209 175228635331150 292758391140605 245200610455267 -171291148751087 -347205586873919 205920413712579 -290725462602981 -3197841873...

output:

0

result:

ok single line: '0'

Test #27:

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

input:

20000 27
-102950314496388 -170242954181831 325697488808674 373907157548787 358156977223878 -163970330431464 -150555164313842 339964384170771 -38733719831206 130486211882370 232363818413455 -337844742482700 -351202196040946 309488201117950 378568785095478 300767678830656 203396092536438 -933468439564...

output:

0

result:

ok single line: '0'

Test #28:

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

input:

20000 28
161234189919365 384243850953888 -247208021002516 168859834943380 -267265759968340 -48567614887402 243891989182845 -361035728922440 346531325710136 247752381082528 -259961906941044 -59648807075984 -350819672848400 114261469499795 105949910153416 -394119559802820 42731394877374 -3469685122366...

output:

0

result:

ok single line: '0'

Test #29:

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

input:

20000 29
-110835120830746 -440481756416 -183813199466049 -186332048450184 336343332178720 -346084064176463 -147344416883340 -130335921123296 79201011424960 -365294202062048 214065685646655 252570960374496 -80660354451310 21311676896162 267703286957376 295833623124608 -381282386710946 -77391934768704...

output:

0

result:

ok single line: '0'

Test #30:

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

input:

20000 30
266221744923087 -43611600265273 197715660404104 376306620678153 346170562670436 -9038934780372 -51518534709510 277019978955390 -306430945477038 336338297580609 -117893377561374 75281340078779 383724780117874 -310751749638981 -13496098232052 143654805315953 1713441642686 36567946984977 11534...

output:

0

result:

ok single line: '0'

Test #31:

score: 0
Accepted
time: 7ms
memory: 9420kb

input:

20000 35
261086357386991 138197557885284 -17326881613642 385446128201589 149037147814718 60076099285437 37723752787200 -340016748082015 165869844792812 -363126041700926 242790410779682 201501530646483 -379175785403283 -24586129293662 352454741604452 379865146705776 -394293994528631 93647101320130 -3...

output:

0

result:

ok single line: '0'

Test #32:

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

input:

20000 200000
-62160073532705 345795118643266 -253830588800748 153905178017232 150846288528027 -132827553787932 -360262917553125 212255454936316 206796234535800 291330296587694 -304767065186252 317589898441176 -181561871905602 202803739416627 197169416257136 -78435599600769 -207999698336907 688175735...

output:

0

result:

ok single line: '0'

Test #33:

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

input:

20000 200000
365874533210795 -265207572641906 173151168807051 -167700906797555 -7789580706653 16652394779118 -4055882403838 163274556289002 211477602137856 -378107263223273 122575447644466 267417364929122 -75506830109442 -98650383772969 -269862229871258 -382958947117952 153404299912456 -214728547263...

output:

0

result:

ok single line: '0'

Test #34:

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

input:

19651 199632
378945851384240 164217582566419 240140963705616 340214768393439 -249041083680633 -120006934048259 -109088861010080 -102422978884408 -109035079501197 236922012652567 343605112657031 194908778119503 -324541985760900 150121607750576 303125888631707 -385533229055240 322529071442948 -2617922...

output:

0

result:

ok single line: '0'

Test #35:

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

input:

20000 20
312654592212559 390198045281335 326146972415621 378615109925141 -48620703531145 49309743411804 -61471419071582 -16089127873796 -162010380075249 295118355630449 252967681771378 -363231309188539 21309896434648 212417713220000 221990473288853 751221578102 147533079485543 252607063228572 377032...

output:

0

result:

ok single line: '0'

Test #36:

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

input:

20000 100
178640832194250 305429961818975 -122765146414498 304985744230453 -357675295326221 218291437129150 -30809451660834 79617580320069 -8596936432994 377870708893883 375337315464631 113358568031661 -289487431555514 -349834333717091 116015450125586 207873941934045 -264312209195762 -21710506680801...

output:

0

result:

ok single line: '0'

Test #37:

score: 0
Accepted
time: 6ms
memory: 4080kb

input:

20000 2
1000000000 999999999 1000000000 999999999 1000000000 1000000000 1000000000 1000000000 999999999 1000000000 999999999 1000000000 999999999 1000000000 999999999 1000000000 999999999 999999999 999999999 999999999 1000000000 1000000000 999999999 1000000000 999999999 999999999 1000000000 10000000...

output:

9913999990086

result:

ok single line: '9913999990086'

Test #38:

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

input:

20000 200000
-172573538337273 -373040111517277 -365593403454271 -176518855235654 289798086353433 -295725807190199 -282751651487499 118004781624485 102682264620464 -352856903650442 152089172937361 -96789358654838 -67594052851217 215417430324530 -106801879490664 2201534438905 -102417426630208 11634811...

output:

0

result:

ok single line: '0'

Test #39:

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

input:

20000 2
399999999999999 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 400000000000000 399999999999999 399999999999999 399999999999999 400000000000000 400000000000000 399999999999999 4000...

output:

3988799999999990028

result:

ok single line: '3988799999999990028'

Subtask #3:

score: 15
Accepted

Dependency #2:

100%
Accepted

Test #40:

score: 15
Accepted
time: 6ms
memory: 4344kb

input:

20000 3
-399999999999999 -399999999999999 -400000000000000 -399999999999999 -400000000000000 -400000000000000 -400000000000000 -399999999999999 -400000000000000 -400000000000000 -400000000000000 -400000000000000 -399999999999999 -399999999999999 -399999999999999 -399999999999999 -399999999999999 -39...

output:

-3991600000000000000

result:

ok single line: '-3991600000000000000'

Test #41:

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

input:

20000 2
304333092650564 278028199241469 -282850416930505 -269754196740969 277591925765328 -14289834504000 -228036937732839 293381288303934 304740642308897 -11858429827200 -111580182444552 -183363104014200 -70473411432600 229282265588477 -339805870093986 365329540585560 40971301615200 38585092423014 ...

output:

3183648825778842

result:

ok single line: '3183648825778842'

Test #42:

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

input:

20000 2
68387181120000 -252762598774950 63092203052400 -259695291834000 332809234002000 -98417199182400 -167568269878350 188451940208400 249120421106400 -346344356786100 332639305801350 -229474191942000 -298942493940000 -356588864848800 -252424125370800 162716834120550 -73355308689600 -2196938193480...

output:

-370067932991329200

result:

ok single line: '-370067932991329200'

Test #43:

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

input:

20000 3
-78361266482829 -180228435429900 -295286987724300 -183374567719200 -200874503275776 -317559259102800 332321400476648 -74992481203662 -108618558005100 350061573071199 179126068226831 -290817005327035 -318352817276395 -163149431573700 -101220993231270 -268601921047702 297844424527650 -17618340...

output:

-13806546045304958

result:

ok single line: '-13806546045304958'

Test #44:

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

input:

20000 3
261214396926978 -144959087012454 -210387721039353 216344925397381 -76496391135230 -21348126074847 -375844836379155 -119248639134944 -208629916077176 -380860719895656 -294254078566701 -289890194430914 -99867748013286 6552871705468 -1661873656872 216571669366360 117379629380013 300310538105721...

output:

-633925516699978657

result:

ok single line: '-633925516699978657'

Test #45:

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

input:

20000 3
-281724422109247 313841693786638 -243498618343071 -315228103279298 -303050773260858 192871703770822 -128796109362480 201347381302846 -100680119110330 -72280060889227 -213019528078522 -233432018240390 -319093350837907 192000461316298 81725108882688 -42754994705664 101468884552820 109914209361...

output:

-927108219843751700

result:

ok single line: '-927108219843751700'

Test #46:

score: 0
Accepted
time: 7ms
memory: 3952kb

input:

16089 2
163220151545916 30280725302184 190085094624756 188066832375864 309107573658120 234011804004336 299057542798464 -24108604093224 -176618424524352 85376569834656 37870175346804 -264984767243844 -220904697834072 87197329750992 -275608969999536 -205718666173896 364661227003128 -267543553107840 35...

output:

0

result:

ok single line: '0'

Test #47:

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

input:

20000 2
312630858611318 -225234588559991 6587566045862 -23761779907047 279126210048870 -291181865986492 -252141410881087 117398294008567 -75299578261459 -121632274093980 -54892459237148 54576587447434 326723932845544 -285299294779421 -241169351543583 -224386089472787 -199670922779578 -29003088110890...

output:

0

result:

ok single line: '0'

Test #48:

score: 0
Accepted
time: 6ms
memory: 4276kb

input:

20000 3
-382592553554064 -174089350029696 348178700059392 -87044675014848 -163243543560792 -69049639323840 91435790366016 -389660449515840 -72936513400040 -163062029216760 150045859169856 120825552092960 174089350029696 244852006880640 87044675014848 190676599974392 -329971869207248 380849310377648 ...

output:

-2349998450968080

result:

ok single line: '-2349998450968080'

Test #49:

score: 0
Accepted
time: 6ms
memory: 4508kb

input:

20000 3
293377114796904 -223087194918576 -255058795043820 -307541636630316 -36272825297646 -38952991715868 -168267404133108 131456430291636 243476031723012 -349545583503288 49583747092500 198232814836296 -324512399737026 -177923666431995 -57834482608692 -257914818876348 366840394489152 3716797682053...

output:

0

result:

ok single line: '0'

Test #50:

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

input:

20000 3
-291673155655950 252078095842800 122526458669700 -380680278969000 -282913862666400 -98145889630050 -1615571582188 -221297927015450 366370126356201 -304702211059650 326692419318850 110442907327550 -217540890883000 5368622976950 228554434800000 142220936782250 -32557506467400 -152464867690400 ...

output:

-129973968344120600

result:

ok single line: '-129973968344120600'

Test #51:

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

input:

20000 3
-72887381213400 -15156294449400 -175275225907200 -328509479095200 -353177083139400 -393725264197215 283950879496312 -350163745663654 341836402287308 356553522678600 123654561427800 284251655854320 46222552888200 -346816112221800 -17512589214000 124919096562000 -84357982781834 -11371366019520...

output:

-286582665006424800

result:

ok single line: '-286582665006424800'

Test #52:

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

input:

20000 2
-188969119282736 -239897648086557 -95083556081332 -30365488951460 74752606465742 68641946547980 393013713761484 -153666421120375 24463892938651 137655103302912 -270638526592874 6280408419375 -360922415286110 168962913149472 -195574863459092 42873993841692 -218675855194056 196881517161576 -12...

output:

23283073202174409

result:

ok single line: '23283073202174409'

Test #53:

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

input:

20000 2
50133134325120 217662946027296 27853723179744 -375331371972480 377409510627072 345224619106752 303037809442368 316187323607232 264163959835776 30947107529184 37202310780096 -73772041424928 231683743781952 -196002568245792 397890999682176 31357370640288 221439348264288 -76066916128896 3720206...

output:

22207970036731507

result:

ok single line: '22207970036731507'

Test #54:

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

input:

20000 2
274544792203374 -88881220319166 72715227827022 285310042475238 38648920703580 -377601397483976 -220477489148286 37939150096128 -204499952787636 -193784156107542 20592663387228 -264243502478538 -10436646225060 180251633849760 368513939590128 16755161049396 220706937060588 12600850585734 22229...

output:

194242242647391226

result:

ok single line: '194242242647391226'

Test #55:

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

input:

20000 4
389421158079360 -14440064432526 224611717784634 -64796111217024 164196419549184 -179619541443356 361655978062830 240841245824256 240124283173038 328392839098368 -328392839098368 -328392839098368 328392839098368 350601586706443 139996848103806 345357774002968 -164196419549184 156232758820218 ...

output:

0

result:

ok single line: '0'

Test #56:

score: 0
Accepted
time: 7ms
memory: 6992kb

input:

20000 20
211086665197380 115547673709440 -239571417658320 -205204285440000 -41040857088000 -142066899475200 106358772523181 -126391338057600 -394799820001020 44403597119070 246245142528000 -135005567795280 -258410800670400 -261886415320800 210616435249920 153903214080000 86963811191460 -250945406779...

output:

0

result:

ok single line: '0'

Test #57:

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

input:

20000 21
293432336415630 -228199348224000 -229003417728000 -276736219828731 372471644160000 -372471644160000 78368363720631 218454219529200 346856846976000 232663946888133 -42648986395467 -148289451065784 -322408726647741 -245750215680000 -270888468480000 337668632064000 -57997146227230 -10477468349...

output:

0

result:

ok single line: '0'

Test #58:

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

input:

20000 26
-334718782451712 285237949022208 -202423342989312 219332104445952 -233629694558208 62362999941120 -14941564473600 -45966059550864 158382440902656 379377818331228 256020598160640 -381712004554752 -355664545007616 -373013421096960 89600709512574 -115456535101440 57056858340660 -33313343844556...

output:

0

result:

ok single line: '0'

Test #59:

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

input:

20000 27
-108320033341440 -188045328384000 145944721686528 -120641298108480 -157148516406096 362331242496000 -144487808709120 199326211706880 -376090656768000 -7934547787776 -390241446948864 24584376655872 317188100620800 -376264638184104 -308085707243520 -21687667605504 -133773038714880 -1275245831...

output:

0

result:

ok single line: '0'

Test #60:

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

input:

20000 28
-214349116454784 221303338177816 14779927595121 116716411378368 -49662885888000 389491693240320 18928152576000 312250064728320 248296263708672 -393531593358437 -66896552263680 258043087715256 -257225228443872 -340427493095184 148197041886168 -140539169595768 -391694148623664 -34637100113577...

output:

0

result:

ok single line: '0'

Test #61:

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

input:

20000 29
255236228802720 116815443437808 -171530448076800 219107713617585 192325961913120 -254511679097010 -252569320486128 -360475154841600 382350003333120 313027595957376 338271975014400 310514168927484 -266002801459200 208984781592081 321789424515840 258665231001600 285294609990388 31254694276608...

output:

0

result:

ok single line: '0'

Test #62:

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

input:

20000 30
-215385480217728 -377685780198336 -145234917457920 -80070314669568 110452931719920 297054936565632 60665900804568 74503337860689 -62475426204480 312620771966976 -241467099170193 30229065765936 312063515688960 -11776426030080 166913426670336 -207217038184704 -16311162481920 -7662273822720 -2...

output:

0

result:

ok single line: '0'

Test #63:

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

input:

20000 35
313150509416448 -137520759177216 227744076321357 46231631953920 -29515344043712 231431681510236 -10567230160896 385248631038728 142564755231488 102446519616512 -249650812551168 -350936582384740 -137373992091648 -79180842663936 -237762678620160 272461940937056 -371632511238144 -5075026182144...

output:

0

result:

ok single line: '0'

Test #64:

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

input:

20000 49
211106232532992 -158460054339584 -176262224609280 54330983972864 -76295799046144 147334558121984 343047627866112 -297899046767616 -369642065362944 -309356851904512 -70368744177664 -351843720888320 -332052511588352 -248591047528448 -101899533034024 -63719754563584 -30987201282048 38158760949...

output:

0

result:

ok single line: '0'

Test #65:

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

input:

20000 200000
-307863255777280 176313776209920 -163154914218838 63359357550592 -367236883677184 -159857792043008 323806174380032 318809175965618 -373833953443840 310886912753664 115255984259072 239523135980928 181951994527744 -137737990569984 255292856074240 227526984435744 -313573318328320 893496184...

output:

0

result:

ok single line: '0'

Test #66:

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

input:

19654 199703
-96480730622016 -278527022796672 -159848537853816 -383844034447776 66589887974400 -234050517308160 -346874800204800 166190349648096 117470779130880 53265378109200 -380513645568000 -323260964087040 -112867380910080 -372595326928184 284339264509440 -350685914375232 -38030201395200 -399539...

output:

0

result:

ok single line: '0'

Test #67:

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

input:

19656 199775
-108803332767744 -190673564939392 92319251053688 -233147669151744 376245577580544 -269149091659776 19568944742400 -126180115173888 -277114441957376 -225194840948736 -275301984632832 228381087822056 -202213061038592 114815333614080 -228565274591232 -327431356638816 132463615283200 -21497...

output:

0

result:

ok single line: '0'

Test #68:

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

input:

19659 199497
313940059804800 -388005786389650 9453301357500 -327134338502400 -313940059804800 14162906300400 120857338532931 353531882761200 -313940059804800 -389067036616687 -313940059804800 -131345746646400 -313940059804800 265738012608936 -103695511748400 196081641756000 -377893120948200 33253104...

output:

0

result:

ok single line: '0'

Test #69:

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

input:

19661 199533
-219144146443776 65950571652300 279262362009600 -276026749747200 -267074704678704 138393789235200 242784760320000 -308874963778560 -98984093091840 -288846176774400 -311672114150400 -220036983643312 -189973108896768 -109624541633280 -233240660904960 200457466675200 254862951552000 130214...

output:

0

result:

ok single line: '0'

Subtask #4:

score: 9
Accepted

Dependency #1:

100%
Accepted

Test #70:

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

input:

6 2
2 2 5 2 2 7
2 5

output:

7

result:

ok single line: '7'

Test #71:

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

input:

20000 7
-188879283315192 -327641745763222 -241580487164095 -15456291511257 -369769190663258 -340530152639888 -110854800023609 -237180776824346 -134512264208059 -384137409658299 143538007114520 -138827172095318 -70973606922970 15646466268762 -241697837888512 203416775183650 390129241715999 1679562886...

output:

0

result:

ok single line: '0'

Test #72:

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

input:

20000 7
-151742663165254 -162128569960956 -3546487995670 -234179013122747 -269434129636615 -331001128312930 -46237519411378 -356472035007319 -345426289988912 361465859260645 156493217632235 -280123973517845 -47027873649471 -358026738589916 -85538856956451 -268699610956249 -23489138125046 -2302463571...

output:

-18347475715474807

result:

ok single line: '-18347475715474807'

Test #73:

score: 0
Accepted
time: 6ms
memory: 4176kb

input:

20000 7
31307079883603 157913089472256 5535571490185 44452981686238 264018870835115 24727873666884 98886347630081 294924808835580 297813670148154 129396714963863 149353331688033 251697854992573 216299211517989 244744692166611 218624821958968 92159435459927 249413689820058 254076704839606 13854191919...

output:

29543180652765857

result:

ok single line: '29543180652765857'

Test #74:

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

input:

20000 7
-235730566432734 -96995421089780 -199641162956677 -85876362529936 -128036349493270 -328172783515658 -377170858269246 -55677933052155 -120293809444673 -369253344232549 -60607300890053 -109230874563349 -281321125227684 -249048240840367 -303520873306476 -273460084116755 -295535269954726 -114291...

output:

-29695400496216216

result:

ok single line: '-29695400496216216'

Test #75:

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

input:

20000 7
199997487031851 -355098360901950 162089462886210 345252205341330 356166673653079 100190028087850 271975090915251 350897266060925 373405343042470 329271193253185 206675944351043 -195616952274834 2868436369174 298649727105525 114220277377522 207678863277479 266971166681275 -78003831182033 8878...

output:

13780792459713710

result:

ok single line: '13780792459713710'

Test #76:

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

input:

20000 7
195128590198232 373651627343450 190842925864726 165464730861073 364820052284142 95239685366111 398346875945728 126015178795922 22899355216179 58450827720647 69333673510452 58666965862713 386643462192390 346159797190454 67617084584426 398780098642653 201486864133084 155565884283903 -207714209...

output:

29762229780701340

result:

ok single line: '29762229780701340'

Test #77:

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

input:

20000 7
-16287996599929 -161662275630559 -4678847011904 -39648405530422 -178714695791010 -193352703347264 -43574776944842 -307353675616021 -174613902412299 -389326061022899 -268915491545910 -178334172760653 -23872396574136 -299674129789236 -392886699962427 -156593675866122 -312883944908260 -17087524...

output:

-31819899511342296

result:

ok single line: '-31819899511342296'

Test #78:

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

input:

20000 7
247056177869113 -1254893812934 267848656061795 51500990150059 51936745042663 119756641279775 -395520845459093 -397448989894269 10217536049705 46191154979432 299579993736317 -137717675288144 113839500658332 228910763160344 -387859950960951 173073753357272 352944435159145 333556237706332 -3681...

output:

560592233952181

result:

ok single line: '560592233952181'

Test #79:

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

input:

20000 7
69280182798759 334106216293091 165300533770610 361150036772636 302958142264326 292470607722417 378394769055644 380284368922239 390080590644342 47263944675379 206304900619418 40393016804141 48999203897016 182288816084012 346358852819833 200033436119639 -147434832228 -359536404498 510576051297...

output:

30134252606026675

result:

ok single line: '30134252606026675'

Test #80:

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

input:

20000 7
-208880830689050 -397948713412718 -147803906775590 -271424890533189 -70179942362435 -244506405345130 -389626655752880 -397921837075035 -342188967060495 -243783710576405 -212131729954065 -269210960862326 -309253773264447 -230256151499192 -366879371869101 -260330778168305 -96373955545543 -9955...

output:

-30849872157489840

result:

ok single line: '-30849872157489840'

Test #81:

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

input:

19826 4
-46434949508223 -142775108678205 -155210737382107 -253391679291458 -351127096393832 -261670302921849 -96518691113898 -185873557434180 -243472723409960 -357425894005440 -108301051830477 -84797111707119 -292450228237761 85444031427607 -160436334009679 371452694757221 -66399848429562 -290700152...

output:

-51660272913396411

result:

ok single line: '-51660272913396411'

Test #82:

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

input:

19981 5
-139106912859376 -246044787914167 -79612364373234 20830527076535 29575419035427 -145578846388668 -82809278494578 28457297686314 61489439894267 189193038989374 -91477676753012 -97842857965930 -146797723871975 -387759492495835 -309378995626855 290577108289693 -17202104929559 88435474222073 -39...

output:

-51572624188967343

result:

ok single line: '-51572624188967343'

Test #83:

score: 0
Accepted
time: 6ms
memory: 4104kb

input:

19866 6
135137361654980 391741380371071 345588950866545 213169615594785 3833248393574 -236701510750480 200776121656557 347505178425165 80701982074830 351213782648310 142797008487715 236719322836910 284404576947645 358694231211920 379435229579664 226874415911750 293734810173347 188606762582893 209503...

output:

37800210405480424

result:

ok single line: '37800210405480424'

Test #84:

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

input:

19767 7
106205431157798 -362278772249363 360774704905207 175497043126483 230837900411905 17039228253920 -154133607116818 -347758717401856 390280959032652 -272103107062150 287485239551265 103269696768742 292488345479788 -141517647613846 248098020095422 74340612679659 248208414572630 307641279182328 3...

output:

10371657390859926

result:

ok single line: '10371657390859926'

Subtask #5:

score: 11
Accepted

Dependency #4:

100%
Accepted

Test #85:

score: 11
Accepted
time: 10ms
memory: 4360kb

input:

19780 8
-214034558626389 143462340263050 367859285076633 267071292723790 -291679279945009 151164119852174 119695436089548 64660520972929 7265606624145 146607287759273 186696077202023 -201032053276031 301323111457436 23018148778661 -93629952803112 -186210396215214 184434596350656 -61782849626124 -829...

output:

2978420603161278

result:

ok single line: '2978420603161278'

Test #86:

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

input:

19935 9
87623797389093 146894779049574 -320533702335433 -28872324454313 137765188959467 -286350758385272 -393539930914385 -223944262298164 -327098860656871 125333276680066 -155691838677454 -56235022001329 371145278261499 104320173158429 -171715160471888 -154838230056350 -46646646805743 2302978721084...

output:

-897805604235234

result:

ok single line: '-897805604235234'

Test #87:

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

input:

19950 10
24404536347132 -160750809466738 -42793772765440 30662702393643 -47861951745060 -112953578072320 -327059332188500 -216527733155700 -299779093943217 -194156963295538 311649565345044 -384966869082051 258489382297683 328720195194267 -369744506701770 -106759605385550 246061001112135 -10678224816...

output:

-179910555458007

result:

ok single line: '-179910555458007'

Test #88:

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

input:

19772 11
41079792215798 156901798143041 261642348243870 -100841921785885 347611899407268 -143157346215335 -49842886182068 134514593836305 340814004844415 -41035121226960 36057878735655 -202085927175381 53485185268802 316336874376515 141218941363360 -355657887176232 388909352625495 126077069300589 14...

output:

497413059838680

result:

ok single line: '497413059838680'

Test #89:

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

input:

19959 12
397297934721204 339646360183515 385842348372495 -181703540945619 395581159234555 -332216732597935 -246548601427953 183519265712566 255678815970501 149559318917855 -77916589617465 -253761550299455 387687048073079 -388241478401455 45820884629212 -351101809679870 -16870074624821 -2230531238164...

output:

-290370162237155

result:

ok single line: '-290370162237155'

Test #90:

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

input:

19891 13
-211279297416033 -32959630554970 6849314031021 382191649401785 291325518835769 240434827263345 -99713460534636 -183956369352360 272420350764562 286097516711721 131268719036130 -187565603353623 246549247868495 -129805217231690 191911704686394 -208212292354451 376978406788935 98546795926040 2...

output:

-129676547562639

result:

ok single line: '-129676547562639'

Test #91:

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

input:

20000 20
-394882022144377 -71586942633971 288824360393430 -118790782477591 -201081366214141 328550210957283 -161737239483622 -391907279672014 244017764280315 67582504442987 -389856177049137 -193786135063232 -76970653861319 324002226947434 -295887647656330 -212937609521412 25104388589762 -14459839066...

output:

0

result:

ok single line: '0'

Test #92:

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

input:

20000 14
355280846613570 259499980818850 210859655525860 189707484325515 201970731574128 -785332548 11353706007930 395133593541484 31601395777490 5027965204020 179546551700087 331760696764805 278917623565983 153404897049162 107835836710800 346791516985329 62924658665869 -108916407160 117613742697458...

output:

369706536446940

result:

ok single line: '369706536446940'

Test #93:

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

input:

20000 14
128542555141 -113687227709671 -277755846788671 -243012067881055 -208480418723304 345153634089 -352954135008475 -319333126282170 -245051319695281 -160162178012265 -214412876920242 -385009998618245 -277807776747501 -55888558005846 -35658309718070 -393273961743516 -305368826038298 -14500087315...

output:

-275504719855755

result:

ok single line: '-275504719855755'

Test #94:

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

input:

20000 15
164088261120329 315847499920638 290955189770830 537200194531 136792419205922 251064014969515 144183137979132 168965566795116 103965501947370 243124325771397 56482592380984 310823456203416 308758992963512 92861157863617 33702420714963 178311032029247 -214137452529 323996565508161 20505549124...

output:

212488998177456

result:

ok single line: '212488998177456'

Test #95:

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

input:

20000 15
-37509909181290 -130835883052399 -325683088818626 212068398542 -348101588725471 -371697082961127 -293746863779355 -197568762983111 -226766594938065 -64304458171005 -265568421190105 -43003020641812 -370876113776518 -367991844702482 -201278475490170 -218707073647641 -371183139314022 -38220933...

output:

-294628331596830

result:

ok single line: '-294628331596830'

Test #96:

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

input:

20000 16
274347658559975 158572702151045 85174617714410 49876716319001 272036976671746 7540058713330 57940864667980 398527150228480 80278501653856 204291862374600 -305983311865 396762649628895 362437824317985 265869629105535 156948935757152 223212635927112 202267759478070 264082899488672 16790105583...

output:

195323274840551

result:

ok single line: '195323274840551'

Test #97:

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

input:

20000 16
-307747794643982 -159842464096161 -3099751935210 -393150271564435 -68466753432168 -215603083387419 -204525651970493 -79036272762590 -174988285347204 -315605148383140 -162887531810718 -388906886591485 -352851733521651 -227303872664154 -328824565568070 -27926133370135 381372959058 -6599466227...

output:

-141014860646226

result:

ok single line: '-141014860646226'

Test #98:

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

input:

20000 17
391826474189430 240587713281916 231527711370956 16851992817296 71299704651871 91650673190118 363443033989035 304749995084785 175665989430165 367020382382836 394377180349152 42216228880485 356677289900581 166997919868797 332016299469855 120155425035282 166017896139004 186412276722007 2677615...

output:

76856568200720

result:

ok single line: '76856568200720'

Test #99:

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

input:

20000 17
-306304041622355 -41106509402773 -58342929725340 -159506813381916 -47500190356364 -33973660008834 -174738165623964 -278177499535481 -228479277772279 -287670134352601 -151537425900744 -135965048703341 -313271265465795 -345781146378850 -1455715819933 -2318679238239 -107962175058474 -125251006...

output:

-187212351552600

result:

ok single line: '-187212351552600'

Test #100:

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

input:

20000 18
31902489521055 192138539854953 10897470769185 48272106988556 235723545421210 369903801734005 66940606556200 330722059418100 283846585853985 81380761545083 125523528789659 351437198433981 129058208597556 223438775234920 222564303373055 185871821852860 288310925493500 -23839691889 25591623632...

output:

109278177838448

result:

ok single line: '109278177838448'

Test #101:

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

input:

20000 18
-208938448785885 -129450412656565 -347958824467771 -87682267430770 -317524502823957 -112512984862590 -109245559245537 -228952323170109 -367640038128090 311223381924 -6049230919680 -276751413278725 -226999211444280 -2342664420837 -308672698075280 -174321729983005 -98590154642100 -34188273013...

output:

-68012218760064

result:

ok single line: '-68012218760064'

Test #102:

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

input:

20000 19
107603568104604 175544296131243 84889706862103 166902210989969 204789443778491 352319004790662 183291059023479 332039072239952 183912913867683 320393646528215 149467582052283 96279499696380 16575056937488 398502699313103 4908132994401 98250947480290 200650221647337 80343917037215 3431312616...

output:

54875580798360

result:

ok single line: '54875580798360'

Test #103:

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

input:

20000 19
-185789507994300 -200099901762761 -77108823105314 -117514893898908 -46877429062695 -83832667132830 -302595808248426 -392432978879760 -320958947458092 -205833178826030 -66245702494972 -66706347684417 -45718055564357 -395926451080220 156450925674 -384256179703786 -395078871195008 -31842388429...

output:

-43319348599098

result:

ok single line: '-43319348599098'

Test #104:

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

input:

20000 20
-318849803229 292556285368204 73450463630957 234912834611258 368732864705205 327623300421318 215540572209270 110043764437780 385342595222106 48886255317306 -387754006343 6766212434564 192585281150316 304200053705144 54907198441165 180737065599827 394714838322272 23927199783543 7165290504424...

output:

2063638382737359

result:

ok single line: '2063638382737359'

Test #105:

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

input:

20000 20
292118355539045 177309903238930 258888441936973 341451941400395 233321389461440 71346300787125 394595288736110 386627509416384 360035754888703 237492231846675 66997442322815 386875730354008 48289746206352 82364366223384 201177023165565 107540446402774 120540141601653 225564102396990 1785281...

output:

922073703013113

result:

ok single line: '922073703013113'

Test #106:

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

input:

20000 20
376492379221140 40783772253679 203382436171473 156277016543340 3331626445719 -35740355365 65881131563247 375887542451283 361791675810271 154376602709641 92795547251757 216291228577424 336607049944506 321342320047672 234039140006475 335416840706233 389577296486413 131018644251880 11889674973...

output:

228517232616738

result:

ok single line: '228517232616738'

Test #107:

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

input:

20000 20
174642384459598 227540140323990 324722991193304 278813346874020 49613045942460 184343191566677 180142228585298 360424875489591 209094429844846 143036075054147 48631437137855 38301253802537 262398235295742 303826563651765 378552693107589 168905071149409 167060146749210 344532475375231 360232...

output:

64514672114464

result:

ok single line: '64514672114464'

Test #108:

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

input:

20000 20
-348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -348774692336070 -3...

output:

0

result:

ok single line: '0'

Test #109:

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

input:

20000 16
996323913 515700185 303759456 436551500 674887114 771771880 635759344 635550729 846116180 103747413 697488019 493855355 945531730 149149077 362091251 372542352 95977791 332879989 663636701 742244789 133948100 810178075 447404895 967838781 742489059 398978723 378379530 494489030 817381675 72...

output:

15029953211

result:

ok single line: '15029953211'

Test #110:

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

input:

20000 17
314764515 98216339 555082473 626039365 156488223 108895995 194282634 134997090 97769100 196711944 285577435 314326285 669583635 704689590 175900923 650084487 775521480 823236791 309629320 858261768 722878805 144491438 799633934 174836246 447220081 263253705 102848900 868746310 321609470 230...

output:

13688190516

result:

ok single line: '13688190516'

Test #111:

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

input:

20000 18
417904795 34826935 952904264 419222023 928606380 982648212 250862472 405807677 756113358 579794215 415353435 519499240 462733505 874837425 606679799 724432475 867382670 722486115 456189734 691008435 128701573 672877590 602952966 17839822 188592404 185929221 643696872 546214284 236146592 139...

output:

13239187920

result:

ok single line: '13239187920'

Test #112:

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

input:

20000 19
417321225 709409467 658813155 220192687 391681598 22732710 104438019 113754543 387647260 868857495 607869225 316106670 5660897 796498010 19323135 733008408 598715962 328964400 756564267 216797295 316470011 204238177 738164208 969329669 669035510 107696604 643245694 860431880 868171997 85760...

output:

0

result:

ok single line: '0'

Test #113:

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

input:

20000 18
997700165 322020919 333262105 710000935 979635345 274028830 486027790 167481351 265972166 687105265 710318895 399338975 813050090 142491195 197140874 147324100 867598368 243542215 346792199 89460360 689167920 31888980 485506791 477576495 573463023 236572952 760480833 220197991 284485157 444...

output:

14309750136

result:

ok single line: '14309750136'

Test #114:

score: 0
Accepted
time: 7ms
memory: 4300kb

input:

20000 9
531368915 68750550 140462364 169160211 54730830 185509654 757885148 915413565 611102380 585613560 135448796 35903065 595463097 771487682 74781300 563626327 671060720 627503730 222320406 557573905 85663106 340254915 242265870 639002661 421965415 666052112 544108125 440696465 555956015 8360109...

output:

18532904747

result:

ok single line: '18532904747'

Subtask #6:

score: 15
Accepted

Dependency #5:

100%
Accepted

Test #115:

score: 15
Accepted
time: 7ms
memory: 35532kb

input:

20000 100
-69431723737844 11161115662167 239152844355108 357799094742609 288125600762994 -233701835979808 -267712262646888 -184788854283366 -167827524400990 397870374406399 -33748339160793 346222107236304 -258303412498923 -378347406004904 348744532582035 -163691423649022 -308517052869483 12265772700...

output:

0

result:

ok single line: '0'

Test #116:

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

input:

20000 100
-353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -353588144099190 -...

output:

0

result:

ok single line: '0'

Test #117:

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

input:

20000 21
45126831501014 342405441510055 270228924362045 24208002395555 334322179269988 338725805538120 348976985062552 187603844294625 356273309769069 -1673976570 288771704079859 283527198268885 396108567279204 96432348804363 383673297240376 230825801654549 365189391981960 54073989141815 36867579978...

output:

30722865370750

result:

ok single line: '30722865370750'

Test #118:

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

input:

20000 21
2835080820 1464193731 -192502795613115 -155665254477040 -198890332479839 -262043189893463 -163276791137779 -366630490937130 -77345104475886 -178771833571496 -166226887574930 2167498036 -213754304721985 -121369776378909 -5492848511150 -73729109769336 -33381352415040 -338691098107986 -1537776...

output:

-37130336442276

result:

ok single line: '-37130336442276'

Test #119:

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

input:

20000 22
151652296125330 322541380227066 146906425908242 210918975745170 232348732325954 322602779049135 187608703759925 87141506095770 244196626325113 114604862873235 -20588590 239401045456931 76634205006975 58488173019705 227710978399905 341527999231122 177155993948500 55763888104743 1924504092736...

output:

18280491900198

result:

ok single line: '18280491900198'

Test #120:

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

input:

20000 22
-149017040228472 -304875351772862 -96916274990535 -310328248664135 -141964024478100 -297854981069800 -210612834841409 -257807518399530 -235021261352724 -74529912206750 -237899699367447 -326892880619931 -281348963039430 -359889633857832 -24744536163039 -203031869668320 -303443785201914 -2734...

output:

-5508185648466

result:

ok single line: '-5508185648466'

Test #121:

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

input:

20000 23
23987158086906 237887747558230 254821381954425 140516396096505 221305691167477 159713304032825 239840037000410 140698312652660 148571356648806 280466495764455 173817883934310 105124641161540 349750458225563 161532535243365 3758470468753 37886503462665 100301622198225 237506787580767 3995505...

output:

6021603837480

result:

ok single line: '6021603837480'

Test #122:

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

input:

20000 23
-4196555358996 -192049703071380 -172483275738774 -280918307214461 -124908512823556 -364248396010980 858902275 -224224281719180 -40629015237855 -208142157472535 -1743613995312 -141058734932124 -293375482031915 -364779498985671 1569284871 -8657223303326 -115622238814061 -307416533111635 -3134...

output:

0

result:

ok single line: '0'

Test #123:

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

input:

20000 24
63152959039170 15219325455180 307397270323997 178855220008065 290181841562725 121983419175115 309332534645097 252434125901958 130555549589465 54559868997348 180624828091279 312920810189988 362260350693703 391595999255461 233181297121500 42533039390010 236761751749017 207308694946925 1030314...

output:

16236780286310

result:

ok single line: '16236780286310'

Test #124:

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

input:

20000 24
-142113117670524 -27430241380269 -255984193555030 -184831628153755 -229442968135325 -322893908649015 -370384805875040 376573120 -235553092954531 -357760878434652 -9949730029811 -27763361538731 -26600542517780 -21586696070406 -2658688657989 -1461145452811 -263736148763594 -325325225096807 -2...

output:

0

result:

ok single line: '0'

Test #125:

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

input:

20000 25
121463620349445 366789024692090 383730567684035 -13394810 73469428378632 343318865669780 314377599991598 377363068924842 258385333033828 149160710404097 82159428448955 63376341993965 383580159220730 106657554393467 180931244047818 283689859026860 174383562367586 358713453471373 121352421930...

output:

0

result:

ok single line: '0'

Test #126:

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

input:

20000 25
-77373743763745 -397729900269702 -315555590182430 -283993142760300 -286842070517912 -46471919369603 -65532463683810 -150674457473005 -398480830948801 -225962485465860 -378911260574392 -318337484427963 -34065143701463 -307040470010505 -16504745161905 -373483626704760 -90300855106462 -1325915...

output:

-17439361302990

result:

ok single line: '-17439361302990'

Test #127:

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

input:

20000 26
53660879187441 187569011484855 -192832276 95252566505525 229751233259526 336781855144185 185364514147771 351146994595800 249397837703885 147882065864225 71621075824925 -55021590 75679669660803 132462295115832 154686999844832 115322640153825 283722027638231 185345203473144 183711576561821 13...

output:

2361912806220

result:

ok single line: '2361912806220'

Test #128:

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

input:

20000 26
-287545950585075 -233145037333362 -88288738051727 -97677511723506 -211866040890231 -262989873628755 -151268892748050 -166344953332314 -114732196817694 -6443444950932 -246859056849227 -128424401528390 -123910918371604 -104860060676746 -11342315478260 -19653979881081 -190004807430012 -1551863...

output:

-1567437523098

result:

ok single line: '-1567437523098'

Test #129:

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

input:

20000 27
387450449509032 244977754466445 300616407789216 183943464402558 378286640708515 80378107997110 64720122914685 162709314230234 177964896040295 88172741641985 137485688602845 298549180834135 206917919357890 372459242224238 396732623908530 310374414503230 331528237649128 243000954839214 153443...

output:

0

result:

ok single line: '0'

Test #130:

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

input:

20000 27
-3662390588466 -124801837503954 -300338592893911 -203011954920502 -253073076037782 -283358652341105 -14270069274305 -337920809467417 -83394116516815 -314721448640060 -384748924449197 -174058819306086 -127082766510180 -211799946444190 -319873693386060 -303886555277162 -181330938768980 -28639...

output:

-1938918103122

result:

ok single line: '-1938918103122'

Test #131:

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

input:

20000 26
332564149405215 212030916540135 204653680279737 16215648488039 17208561137245 134297941214745 155824507328776 39818226913150 63935316445715 254123628397041 349078383021390 201204410059065 104141066214185 8003600833850 172075568607425 267387541933314 302980047089720 15606400525859 2411382261...

output:

335314708234

result:

ok single line: '335314708234'

Test #132:

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

input:

20000 27
-186411251509450 -108806309429881 -353444908717290 -392858989543020 -372029506569699 -398187206806235 -314545937594163 -277333230909371 -18358339893322 -257673995750798 -349634632486854 -147683572069419 -201561701277222 -308292455333070 -192718717781956 -283215763333110 -308828570643285 -24...

output:

-1081991127910

result:

ok single line: '-1081991127910'

Test #133:

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

input:

20000 26
263957776846302 343161746097170 173887890010120 216027658261415 382947028540024 92013366446859 120165898539687 158365368557550 232548397218786 313553295957657 310987476797008 260104831824201 134930181880494 85250615860410 322653998802358 250506865471317 864797580090 72165866030643 319184672...

output:

5706457721510

result:

ok single line: '5706457721510'

Test #134:

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

input:

20000 27
-78090815047427 -114116643174094 -36044152127529 -385985909353148 -287409854521260 -151911352099332 -266771005164755 -203250515821431 -388950217102304 -277877308072760 -210238578421810 -339867530339623 -125872746129570 -138870055779378 -233161505421900 -340929740598390 -138288511369008 -281...

output:

-2890470788310

result:

ok single line: '-2890470788310'

Test #135:

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

input:

20000 28
63028189679000 370669144867835 379756733078580 11295957128885 322614309727164 154983964521035 84390887532042 360182099642079 171907823634339 137394977124317 44071138195370 301479378433038 264897077086530 281498114283075 217757334753075 109983778050201 87011502544785 92383318654935 251165904...

output:

0

result:

ok single line: '0'

Test #136:

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

input:

20000 29
-20951110452181 -345812127381864 -237224979245683 -127940258309808 -329927861135301 -326163103985185 -208074183413824 -174370846785135 -64294498927113 -71228956033010 -281549644342200 -269625193027281 -15538650658888 -253726024262325 -100635710369940 -136369869182495 -36439244215110 -714813...

output:

0

result:

ok single line: '0'

Test #137:

score: 0
Accepted
time: 69ms
memory: 4872kb

input:

20000 99
198935793318899 175192255726180 -302635924626035 3554410985125 -24281638671017 267770501897847 227351252602617 189775148072510 250927555711404 149527880560697 -239224183847605 200895663164812 -57563561153384 350532418869745 -9561072606358 -41865003732409 184773434086747 301321190321437 -278...

output:

0

result:

ok single line: '0'

Test #138:

score: 0
Accepted
time: 70ms
memory: 4764kb

input:

20000 99
26024497858723 212692616145009 140946363253185 -75640760882687 350382318157606 -285454331264960 111508947523974 -123331322997410 250599163113075 150148387319931 382419199937614 131989988454324 348467607043490 243674479621980 189921894172525 174750038916453 -67228455656999 -259442577542104 1...

output:

0

result:

ok single line: '0'

Test #139:

score: 0
Accepted
time: 65ms
memory: 4952kb

input:

20000 100
-91527326047230 348729213823419 -202695036292606 -242734765722163 -211133479824080 -167719167528289 -326097247494095 126920902692717 -358402825744964 -254686180867085 -298606008214280 381438986323830 -132939277485567 129364831385790 143246889102174 203816899011180 -35744070686835 206043845...

output:

0

result:

ok single line: '0'

Test #140:

score: 0
Accepted
time: 63ms
memory: 4728kb

input:

20000 100
-49749795165499 250380000685958 -120119000657513 186008244583700 -95939795246661 -183215874620899 -324427662203183 59547531536325 -43976353949528 -99076858649155 -351385498760240 295102298883161 -209230409072776 249436413859853 -61744877627550 376335126194508 334162984691900 21660242321734...

output:

0

result:

ok single line: '0'

Test #141:

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

input:

20000 25
5176380 838208721 500387895 226035628 29246206 463538780 597131145 857130351 792190047 952351155 630531473 88429495 54415746 460560855 198002952 886111037 819512218 448684465 598005810 895047202 573782748 638055622 287210451 972589530 339418291 759237864 816780715 255753813 225796494 180533...

output:

0

result:

ok single line: '0'

Test #142:

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

input:

20000 26
443675089 828908262 280189826 917780864 569490922 122444322 655786483 790704430 546068985 899024451 298787580 665962556 284882906 874633452 253527885 556384563 41498275 885592169 429225160 951247444 527858058 336851515 253020911 229544744 723002962 701957795 826024815 530526276 731144568 91...

output:

0

result:

ok single line: '0'

Test #143:

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

input:

20000 27
329584710 869313802 91675815 299236210 514618572 435139635 943653867 933121670 821448945 302392923 640692715 649018435 622792716 332338695 981670935 369958082 432050359 954941748 728858102 357985915 769283875 766178231 858887896 38507911 882230895 770011480 350550608 570130464 21995688 5299...

output:

0

result:

ok single line: '0'

Test #144:

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

input:

20000 28
577082170 900413382 33284779 328904576 437744560 358377110 825106730 553940310 691968277 97274793 321757436 346470540 582830703 758419948 124727130 531844456 64743752 253248996 936536678 10247745 102944809 672620013 286055770 578903703 226831475 559760895 283264982 569793131 693184622 52803...

output:

0

result:

ok single line: '0'

Test #145:

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

input:

20000 29
641415357 889604142 188646535 683516658 724803469 52457860 945483903 708730946 555515730 60520551 460925465 485555070 205014810 515283285 825288959 366983100 967880595 842330937 24358950 373555182 666952195 804814010 990790625 957752400 226692895 94920371 872537380 961881935 764365980 61182...

output:

0

result:

ok single line: '0'

Test #146:

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

input:

20000 30
452321961 779061465 992576910 159527550 101838100 224750715 445407690 134943510 525821504 736564185 831766026 751814154 337868659 651321905 771190725 868500867 995364552 6028230 896529867 269081488 386295624 799164713 885457000 24734970 416410631 680323644 870321900 514940907 835467639 6377...

output:

0

result:

ok single line: '0'

Test #147:

score: 0
Accepted
time: 7ms
memory: 4888kb

input:

20000 35
804238890 867096195 450464560 615176705 853854235 854224098 713720316 63837839 390937218 690624935 960719760 409283658 44518201 749353948 769400346 299431790 500415440 220714657 601273365 346199106 731830330 107697720 200365165 252915938 202249425 501889245 779651705 233084467 258075895 966...

output:

0

result:

ok single line: '0'

Test #148:

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

input:

20000 26
67695802531773 372173312869605 260419892509140 377546666097575 260791425268143 331067698582511 20012001224631 399527061996482 106686739754855 394943536364423 87989899244445 120884406700915 253066996326365 225990016720470 75556747733775 176214771377645 328788731666395 50210147707038 28934078...

output:

2496105297630

result:

ok single line: '2496105297630'

Test #149:

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

input:

20000 26
135672669276755 117767279303212 261316297129965 289903281739422 307023895536820 116181348833319 257990307890601 366869962179435 203643913669322 236048314384575 167488520869670 20962751769080 283809233222515 388782978243330 160206515322425 6566511940989 104291851186666 360264323892876 201221...

output:

18337964067696

result:

ok single line: '18337964067696'

Test #150:

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

input:

20000 28
133596264625915 99922798237425 390482416642335 67284889185052 301238818888042 80303635090510 121751498217020 59798005940365 336764160819702 210390819296229 357787223372777 260901590475799 20248994639601 310266938289422 332984395776659 205295502009690 217596149717674 313315892304415 67535518...

output:

0

result:

ok single line: '0'

Subtask #7:

score: 18
Accepted

Test #151:

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

input:

20000 200000
251159317 887191501 857733752 384683418 134050448 506121340 780905769 276370704 109535211 872899439 556774439 434676879 148563667 12737512 153656019 878376794 609869178 575053645 396025679 379898138 703697683 487484329 551835906 619319386 488957017 16140328 920609560 848562444 895060489...

output:

0

result:

ok single line: '0'

Test #152:

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

input:

20000 200000
724210037 755707641 156547010 555537088 113399702 50600117 805645048 324587396 330469367 155203622 231034879 491203919 381331054 37563945 670593638 955824711 893116900 434333908 269456401 524195082 850761432 962407914 66943416 841193769 216303578 741226345 633703781 428987304 213742097 ...

output:

0

result:

ok single line: '0'

Test #153:

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

input:

20000 200000
374812600 994082310 605134761 684542859 982411551 843412691 291261765 330739292 783372065 282879285 236674945 191231950 205139415 671527412 718556510 298378287 690211050 314845758 727982772 546915798 418003633 440038852 722428850 350395773 313451593 886716447 653810460 441437689 6576444...

output:

0

result:

ok single line: '0'

Test #154:

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

input:

20000 200000
922502763 107609502 103470675 95666571 55541265 612819636 381916150 444880709 795379767 2430890 658581770 555137154 206155831 593685430 200503941 204169478 460090356 547836575 486245188 833131418 548238350 227908135 269796072 956669021 301543110 26102010 813507527 825832865 774750219 93...

output:

0

result:

ok single line: '0'

Subtask #8:

score: 11
Accepted

Test #155:

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

input:

20000 200000
396977329688022 -8423371363214 383571122639006 99712372108087 291078785047968 388310484655305 362117849739665 -120348551555749 26985765506461 192508503736541 185676740370600 -214164742554207 352594619152236 382485504805765 -152156638968634 -12362549868218 381290775270609 -39341784805470...

output:

0

result:

ok single line: '0'

Test #156:

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

input:

20000 200000
-376779492228556 220532202187586 -309688873519988 39881542970776 100767764401490 -235495675902395 -302715275257491 311354496660425 -76644013558600 226644786040675 101791414632449 336066873772337 316747556954027 201556679369344 52360728232444 -102427327186816 273838058513205 -17068539884...

output:

0

result:

ok single line: '0'

Test #157:

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

input:

20000 200000
-386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -386480064480510 -38648006448051...

output:

0

result:

ok single line: '0'

Subtask #9:

score: 12
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

100%
Accepted

Dependency #6:

100%
Accepted

Dependency #7:

100%
Accepted

Dependency #8:

100%
Accepted

Test #158:

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

input:

20000 200000
131345975661130 -260853751726781 -359777264921381 -193389198059485 236912263335510 208871565369118 328884943350837 -399308579184995 -240596825766143 133086554886072 -252581899217480 -301677083101631 -343918912829723 -231764139641359 -216572481584484 151984214219323 122350048232128 -2347...

output:

0

result:

ok single line: '0'

Test #159:

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

input:

20000 200000
157584858777257 -31893883208686 -253028671145782 -81183172432517 46601242689032 385065404811420 -163911326882039 32403058965771 -344226604831204 167222837190207 -164426075224056 76517678460634 -379770269995228 387307034922221 159981740380873 233956291665004 14897331474725 -1840171951703...

output:

0

result:

ok single line: '0'

Test #160:

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

input:

20000 200000
373757740728064 -114825946494831 113427057621020 -294016692420771 -334972807921334 395852766205897 -40575009791109 -181736726618293 204120200951261 324520739982075 -23901148803875 -348448145086041 264055720847919 141669794452144 -52128316633900 366785752540324 136176101974458 -290997492...

output:

0

result:

ok single line: '0'

Test #161:

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

input:

20000 200000
11298227967390 106610585353350 -96357856845250 376315523659530 -21251606551696 219124743788665 -295942246916030 242144505290105 -90271622097755 30643871615335 55228992065975 -168674634743739 236004152074485 -19981408979895 139657382576920 240576277627560 -123831966896176 397587010099695...

output:

0

result:

ok single line: '0'