QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#87137 | #4406. 独立集问题 | Bird | 59 | 191ms | 64184kb | C++23 | 968b | 2023-03-11 18:08:06 | 2023-03-11 18:08:08 |
Judging History
answer
#include<bits/stdc++.h>
#define N 351493
using namespace std;
int n,d[N+5][2],fa[N+5];
long long f[N+5][3][2];
vector<int> e[N+5];
inline void dfs(int x,int fa=0)
{
static long long w[3][2];
for(int y:e[x]) dfs(y,x);
auto getw=[&](bool type)
{
memset(w,0,sizeof w),w[1][0]=-d[x][type],w[2][0]=-1e18;
long long temp;for(int y:e[x])
{
temp=max({f[y][0][0]+d[y][type],f[y][1][0],f[y][2][0]});
w[2][0]=max(w[2][0]+temp,w[0][0]+max(f[y][1][1],f[y][2][1]));
w[0][0]+=temp,w[1][0]+=max(f[y][0][0]+d[y][type],f[y][2][0]);
}
w[1][1]=w[1][0]+d[fa][type],w[2][1]=w[2][0]+d[fa][type];
};
getw(1),memcpy(f[x],w,sizeof w),getw(0);
for(int i=0;i<3;++i) for(int j=0;j<2;++j) f[x][i][j]=max(f[x][i][j],w[i][j]);
}
int main()
{
scanf("%d",&n);
for(int i=1;i<=n;++i) scanf("%d",d+i),d[i][1]=-d[i][0];
for(int i=2,fa;i<=n;++i) scanf("%d",&fa),e[fa].push_back(i);
dfs(1),printf("%lld\n",max(f[1][1][0],f[1][2][0]));
return 0;
}
详细
Subtask #1:
score: 13
Accepted
Test #1:
score: 13
Accepted
time: 99ms
memory: 63996kb
input:
351493 -641495974 -401868912 -864400429 35718599 -579296290 767835327 149511992 -246228754 649472235 893048442 -292675192 -788090312 -578172296 -62289673 196890164 -120059197 -452848333 -216788131 -604555771 -240241020 376984486 -407661514 -107574590 -461679558 -470560314 -583391402 -991686079 76956...
output:
175477002777567
result:
ok 1 number(s): "175477002777567"
Test #2:
score: 0
Accepted
time: 124ms
memory: 64000kb
input:
351493 -56100243 368534199 129964394 -89815018 -91235204 957523014 -460852634 -325788014 -402912154 321855921 454630730 558766063 227409254 -961488779 421605421 691666242 -230378151 -162955273 -236886327 -612720805 897977225 -86952503 798514303 108426380 652820044 -570978053 -646910035 -167973689 -7...
output:
175582921565606
result:
ok 1 number(s): "175582921565606"
Test #3:
score: 0
Accepted
time: 72ms
memory: 63904kb
input:
351493 763351894 914829770 269353066 -650659200 -281614670 -384638266 266301720 599060286 929263636 -383459829 900862182 -735284265 -207058691 -896484301 821480927 90661512 -679895618 -995726473 511471086 669880712 461077012 -131405343 997734902 -904033660 245840121 355028008 -909036951 530267463 93...
output:
175928061618383
result:
ok 1 number(s): "175928061618383"
Test #4:
score: 0
Accepted
time: 96ms
memory: 64184kb
input:
351493 -476871284 310380923 -524195986 740923407 -507205286 -708342444 845300375 163395319 -118327194 -777909892 -864449914 19995101 -709759263 -967727722 922294345 -493915772 -812562398 -365413759 787107009 4270638 -295451830 -162056816 -884264923 -870042647 -996069213 573972294 155864269 -58906286...
output:
175650564210340
result:
ok 1 number(s): "175650564210340"
Test #5:
score: 0
Accepted
time: 99ms
memory: 64160kb
input:
351493 -173531743 557238083 -824113374 -84997552 -528741973 -448737148 -646930897 649003342 -608133665 912285973 -922564290 602546534 116884217 -500565119 526827675 123739579 41774236 205999423 15304413 861611850 39040664 895088899 43155838 -326769005 671029213 124031672 249778755 -644568506 9118445...
output:
175833127330368
result:
ok 1 number(s): "175833127330368"
Test #6:
score: 0
Accepted
time: 96ms
memory: 63904kb
input:
351493 867082022 -654438792 -563132739 -602771213 -498674813 -925363988 -32298673 -538019554 -334530735 571873145 -583030757 -378539176 119681995 -90196121 460241188 -516789360 211603768 -509897029 -852347880 830444888 269349329 -428858753 -137073395 130042891 644002528 -137140981 979900884 36818325...
output:
175483737223472
result:
ok 1 number(s): "175483737223472"
Test #7:
score: 0
Accepted
time: 106ms
memory: 64012kb
input:
351493 -447335302 -476762578 372057221 936789657 357038272 909731828 -683347165 637447470 913095563 316451704 414765801 786600053 -65647567 924518593 -769778430 -347838583 923771357 54765382 355559903 -210849764 194278668 612466423 120679972 -184875188 -467919689 -45407455 -881561838 -591488257 2692...
output:
175817072416071
result:
ok 1 number(s): "175817072416071"
Test #8:
score: 0
Accepted
time: 100ms
memory: 63964kb
input:
351493 402240742 668233786 -889881161 457723983 862248981 -258221456 961999793 -357283684 -906564302 -597314876 739970397 -677435760 -950807663 -637315042 -933332320 277627831 540469730 711450896 -516333572 663145310 104913901 -511477049 703469693 -593297236 -407591592 804894830 504458817 -220727610...
output:
175806964829997
result:
ok 1 number(s): "175806964829997"
Test #9:
score: 0
Accepted
time: 111ms
memory: 63948kb
input:
351493 76730680 435846940 -794852623 555620609 -611204625 838568963 -703848513 -448239085 -115097249 -41368701 370845103 -523596605 -574028136 -999717105 -940170307 -882957379 168314209 462026163 -596102197 223187871 -231867307 165204442 -217815785 982666489 616325768 -834213481 -7172241 587603787 9...
output:
175645279435054
result:
ok 1 number(s): "175645279435054"
Test #10:
score: 0
Accepted
time: 127ms
memory: 64004kb
input:
351493 -418521650 -556841193 201271611 -455552220 660456263 -188352499 400020859 986402784 -477116947 -886627587 -840995307 438113972 -154696898 -817068532 -876194676 -576445413 -955919626 -10695871 313744268 -647421383 -836372934 -41870379 -384156565 570580595 136462961 602569688 644933476 52733996...
output:
175802261388786
result:
ok 1 number(s): "175802261388786"
Test #11:
score: 0
Accepted
time: 94ms
memory: 63960kb
input:
351493 -130691318 904648843 -732528532 646985259 8633249 -936982284 497541179 640396747 650407531 458099270 -690004072 889148550 -350891786 120609938 -210082522 -729055455 -507136771 754502959 742704465 -771332127 41517881 815637674 193201716 -748352958 816227236 8740519 661093724 -269939318 7725096...
output:
175701865379333
result:
ok 1 number(s): "175701865379333"
Test #12:
score: 0
Accepted
time: 117ms
memory: 63952kb
input:
351493 -66854912 -950343871 -199904682 509621680 495040850 929289473 158195385 24793111 617279847 -851601360 -376102480 -28253220 526524472 165842584 -938843661 -255803056 427156408 -921301927 -493038885 -301127735 -392384028 -897791614 -404752254 -331044497 640039210 -718591427 -655295253 -78657017...
output:
175609650615928
result:
ok 1 number(s): "175609650615928"
Test #13:
score: 0
Accepted
time: 88ms
memory: 64180kb
input:
351493 78301096 -52604596 821967420 17665215 -854562351 531797012 531579374 -630259969 483552256 -406544826 -444229744 -36337606 -923613351 572356707 150744251 -893122680 -867494723 -787026829 -57721719 854240591 -997955163 -521393917 -601344208 428938884 -361341200 -930370842 511195865 657470791 -9...
output:
175839770381205
result:
ok 1 number(s): "175839770381205"
Test #14:
score: 0
Accepted
time: 97ms
memory: 63972kb
input:
351493 -386682919 -77525384 946023467 359887410 608228613 -61098422 -221702696 677632268 -464778216 -208646176 376278620 -174464731 -71286142 545647495 775301975 360115639 210057946 930655420 -285693349 264575602 -205129496 148376086 -723599206 671466170 -516424717 -456455162 -412650777 -833372579 -...
output:
175710205504618
result:
ok 1 number(s): "175710205504618"
Test #15:
score: 0
Accepted
time: 110ms
memory: 63992kb
input:
351493 180349695 744582170 -231466196 311156193 -918224163 742801932 499244357 -122245208 -945991826 632811907 -702788218 -377450924 -127055866 413899582 377349215 -109237274 875498449 984669327 -582590434 -535969194 -515202930 -865614356 712340219 -432417784 -259839200 -334614797 629153456 45235977...
output:
176087255650160
result:
ok 1 number(s): "176087255650160"
Test #16:
score: 0
Accepted
time: 134ms
memory: 63960kb
input:
351493 109291948 656740495 -240687300 816865496 842030537 -83872038 945788784 -175127748 -220378521 -514168111 -75918273 -424031742 618185653 -425893462 184086440 246901383 84933177 484058459 -92426164 41491205 -322743318 -110098421 870843057 441185062 -905737330 -905272154 -954353925 -645539990 -87...
output:
175519371658187
result:
ok 1 number(s): "175519371658187"
Test #17:
score: 0
Accepted
time: 103ms
memory: 64180kb
input:
351493 -614599670 -474846006 -710707577 106808435 -164026900 -724701218 -303848501 558316928 270492819 282023076 -782348251 -886449416 984530125 -357437687 258764323 418885593 479670569 -80377126 754298657 812349532 -410328644 665455088 -524573843 -608180507 987618127 -953474049 -639822420 14005562 ...
output:
175786283410751
result:
ok 1 number(s): "175786283410751"
Test #18:
score: 0
Accepted
time: 99ms
memory: 63908kb
input:
351493 313622497 -362940646 -140097326 256552576 724046027 -409629799 414191927 -893521269 468491250 -617455748 586032127 119415071 378904243 351070874 -986532004 663803846 -866585240 954006674 -955305655 -448803947 621831295 865445237 -543156005 611055742 23286086 343559876 921703921 149690983 -586...
output:
175515918477177
result:
ok 1 number(s): "175515918477177"
Test #19:
score: 0
Accepted
time: 100ms
memory: 63940kb
input:
351493 210604902 501648292 658492051 -525347627 -355907514 215124219 -86804060 996495834 -188590493 -641319941 -220244419 141195062 806233339 -318366404 25549101 -172002820 -797770181 670028866 734746879 -815883678 -641475613 796222600 407452159 -634832863 500778632 640126487 -119988287 294492816 75...
output:
175726295662131
result:
ok 1 number(s): "175726295662131"
Test #20:
score: 0
Accepted
time: 141ms
memory: 63952kb
input:
351493 -843129055 -348494677 -733126523 -699082751 -414986184 -488503685 -801447831 826403161 -690681531 -978669772 -100314374 -11538509 -697056616 719592518 511215252 -522716064 535232416 91782539 739147694 -280251272 -529888836 942685287 861536350 331302306 782848263 648864506 -945194734 -20036503...
output:
175405997725361
result:
ok 1 number(s): "175405997725361"
Subtask #2:
score: 0
Time Limit Exceeded
Test #21:
score: 6
Accepted
time: 99ms
memory: 39084kb
input:
351493 915594742 688454502 456077914 208864399 625937959 102483811 538999077 529481828 400375958 387560315 83710527 83424975 330114353 684812426 68052931 28849220 295907801 535129167 967891325 124069427 644256858 757666812 558755455 178666038 177054898 795236216 848264282 669310447 328353372 3681163...
output:
175766699890054
result:
ok 1 number(s): "175766699890054"
Test #22:
score: 0
Accepted
time: 168ms
memory: 38312kb
input:
351493 558106095 906433626 370590649 172443229 359294152 56072006 85811676 997806511 819710547 234550001 616962251 426062666 836364151 264171065 793148682 129635867 178265836 843676703 590478956 841451015 534070481 684617914 671870778 955426286 402736154 219850741 31973708 468849347 318576756 566186...
output:
175789713405292
result:
ok 1 number(s): "175789713405292"
Test #23:
score: 0
Accepted
time: 173ms
memory: 38112kb
input:
351493 697337673 266522793 679080819 687432689 315959590 268236149 622432001 129168391 88821388 63460774 833956640 413225945 865578649 11740512 786453528 891490067 227393189 334925606 170461981 87131025 281424141 946670090 604404324 925017592 888575931 471618837 629432076 743503791 324979198 8629246...
output:
175724312347028
result:
ok 1 number(s): "175724312347028"
Test #24:
score: 0
Accepted
time: 189ms
memory: 36712kb
input:
351493 9531759 599942847 513281388 9882449 796417077 291041867 324675328 353930252 412321421 947586559 980567086 932827768 615572841 156171760 286692109 886990028 854036272 728463778 206412416 607769313 369514800 628501404 675176090 546072905 149647950 881372300 854487923 790989321 278143384 9314385...
output:
176060086769570
result:
ok 1 number(s): "176060086769570"
Test #25:
score: 0
Accepted
time: 103ms
memory: 38936kb
input:
351493 643775169 784877155 491694248 460219180 421128561 836782766 473863207 74882458 186014002 171438888 487180871 816794740 59414460 519426472 148886585 918349979 15159789 599907429 955714969 506035160 720124140 982522735 4982763 971414716 606296383 279256990 561146067 112502530 687865897 90245951...
output:
175648851969743
result:
ok 1 number(s): "175648851969743"
Test #26:
score: 0
Accepted
time: 138ms
memory: 38128kb
input:
351493 123237838 283456533 538135616 244437927 706620575 310122605 992938749 472163222 432235898 484245342 707496878 494795908 169710548 623933631 26633626 961248631 718394700 717089363 9197104 187450047 894757617 248877232 996630094 315805422 595658941 572547722 304120890 318645450 136013835 705343...
output:
176082772867468
result:
ok 1 number(s): "176082772867468"
Test #27:
score: 0
Accepted
time: 155ms
memory: 38096kb
input:
351493 493928676 984704906 762295072 154664431 387000499 896160744 324405265 308004744 146928584 286540247 476051634 29387846 153694128 904411262 235634769 90897616 716372605 164062799 287383600 987535709 912413555 578718041 845850944 780667717 349187025 181006164 269798770 457360038 11494473 586660...
output:
175982434649427
result:
ok 1 number(s): "175982434649427"
Test #28:
score: 0
Accepted
time: 191ms
memory: 36704kb
input:
351493 373358965 951308820 424481180 333184243 762747734 299885513 496753597 384905589 952388078 213620815 278496250 26390625 340233798 679563691 954378041 269675534 688200374 328300513 630660987 729017309 708106475 394616923 85958853 207679917 920694818 428823833 200109332 105757527 672789240 17044...
output:
175523574288506
result:
ok 1 number(s): "175523574288506"
Test #29:
score: 0
Accepted
time: 94ms
memory: 38880kb
input:
351493 506414637 19246988 476208040 321308506 350947555 498933784 814387431 524390797 694368970 992574521 392132519 681977993 617740744 398570047 955429187 794467660 445101459 899280020 672979531 62822811 91114630 397022041 36970950 413181439 297515602 132779417 715324259 85542261 118543552 62088701...
output:
175964348079203
result:
ok 1 number(s): "175964348079203"
Test #30:
score: 0
Accepted
time: 189ms
memory: 38140kb
input:
351493 198986773 906039921 401561964 93692787 563587809 277069277 678358946 609472935 100076981 910544643 304070724 326539759 555008482 797065754 463351941 521204940 580755165 70283699 968677479 678670254 461445625 53081211 818350939 282327778 123198870 873506 986227805 684460826 703461192 383879044...
output:
175742703185211
result:
ok 1 number(s): "175742703185211"
Test #31:
score: 0
Accepted
time: 148ms
memory: 38112kb
input:
351493 80155259 677489804 317709905 738646332 926916041 417796814 406341624 483755769 292807023 179580462 793077212 266345199 545969570 486044911 715470803 444124568 31002634 985463900 389193993 592838646 861091277 63490585 660350533 828216029 427234331 20581790 342489221 996887734 917735536 8984175...
output:
176015004295927
result:
ok 1 number(s): "176015004295927"
Test #32:
score: 0
Accepted
time: 156ms
memory: 36908kb
input:
351493 502158417 129819235 891767970 99219238 183211216 247517042 540523173 223127548 890246367 488281842 142446217 419214467 64348530 964962625 160502713 368547515 849639720 446159538 419790713 352578054 409914263 635929477 175211453 71785060 341607425 623960228 540374304 235478238 941333686 405860...
output:
175933407600618
result:
ok 1 number(s): "175933407600618"
Test #33:
score: 0
Accepted
time: 109ms
memory: 38872kb
input:
351493 398441962 739520539 491612719 742311876 374717677 206652911 205850479 766243471 807089323 737974241 255255614 662249856 427102454 708382982 50385340 588046648 257468479 272568562 823245583 37260800 566193872 806916151 739940499 741176228 282055372 245646403 597782839 681382879 988980236 56915...
output:
175770971030507
result:
ok 1 number(s): "175770971030507"
Test #34:
score: 0
Accepted
time: 145ms
memory: 38140kb
input:
351493 880628558 121299849 543626556 62033726 562477905 807001043 375706344 218418912 907912385 670274061 135077427 922954507 32404993 210176781 996211632 619526575 919287588 729593055 761653998 610447247 809155528 512214275 521742984 864589741 530033320 679020122 655547772 939779173 682018784 71763...
output:
175730808311141
result:
ok 1 number(s): "175730808311141"
Test #35:
score: 0
Accepted
time: 183ms
memory: 38328kb
input:
351493 648831108 530007650 638538805 608006345 296077170 329899021 678769314 440482296 786721906 668042529 665202240 65800140 350709681 770903722 132697538 767023695 734488378 823129781 81049058 17970450 369322341 159217770 161299857 770481561 200199260 666640973 804754414 446866493 126946712 153790...
output:
175403445299245
result:
ok 1 number(s): "175403445299245"
Test #36:
score: 0
Accepted
time: 176ms
memory: 36724kb
input:
351493 502044059 501804302 211313768 511242 940995264 692839783 506574553 788353346 414910991 728892560 163315468 703340870 64162305 265589155 728350156 90806809 279802465 603050289 583538947 889537982 296696464 894996691 664404573 517096711 643986848 746421610 511916825 917579434 354474598 16810987...
output:
175704819099603
result:
ok 1 number(s): "175704819099603"
Test #37:
score: 0
Accepted
time: 125ms
memory: 38856kb
input:
351493 928817795 15279764 129664762 227080241 523789462 737285062 435944240 506893816 48628908 163684964 26567120 773587005 417584420 284427030 541080558 551027755 533540940 323802299 559241453 839256263 519627534 412275450 563331642 815778319 614934015 836399328 769156966 589297693 908680090 798560...
output:
175889450274061
result:
ok 1 number(s): "175889450274061"
Test #38:
score: 0
Accepted
time: 189ms
memory: 38160kb
input:
351493 251823026 589762742 883250226 961879394 735612675 902451776 40728364 60794721 55273426 161191483 59454831 807594742 528956045 913984188 24433970 559087551 115859648 526548286 32135802 697916215 58068040 394191777 509967320 883927969 307425399 597909709 568479829 932237308 679211452 562575518 ...
output:
175666089806924
result:
ok 1 number(s): "175666089806924"
Test #39:
score: 0
Accepted
time: 167ms
memory: 38168kb
input:
351493 985558020 54549874 730558353 134850543 426343132 553651399 98142769 39888642 60620869 919884891 642437383 798573040 753253917 962593094 378736236 977464159 307193246 831091882 406048067 858980717 316565234 586557313 893832302 589087976 295813039 297530468 815341048 84460051 664360694 54719444...
output:
175692300229036
result:
ok 1 number(s): "175692300229036"
Test #40:
score: -6
Time Limit Exceeded
input:
351493 795244249 805155169 525778916 836974679 299806591 692112605 622788823 43709098 172248498 161804880 803887069 398609832 320064475 776199168 867218919 146403854 81784201 663602929 874781937 276829658 612886854 545957546 753834680 356435736 62451554 626249096 280389459 216467831 587882687 849844...
output:
result:
Subtask #3:
score: 11
Accepted
Test #41:
score: 11
Accepted
time: 1ms
memory: 11832kb
input:
7 247522519 398923496 -976223527 806215585 -937536479 -130552271 90576461 1 2 1 2 5 5
output:
3587550338
result:
ok 1 number(s): "3587550338"
Test #42:
score: 0
Accepted
time: 3ms
memory: 11860kb
input:
7 -822791105 523257970 894601243 -90617653 -41818991 -868075494 -944374389 1 2 3 3 5 2
output:
4185536845
result:
ok 1 number(s): "4185536845"
Test #43:
score: 0
Accepted
time: 4ms
memory: 12024kb
input:
7 -566350725 996649344 340685939 565531548 -379550593 -183515822 -6548810 1 2 3 4 5 6
output:
3038832781
result:
ok 1 number(s): "3038832781"
Test #44:
score: 0
Accepted
time: 7ms
memory: 12024kb
input:
7 -343171001 -403362511 46959184 -369697450 -102687963 -567117121 955599726 1 1 2 4 4 4
output:
2788594956
result:
ok 1 number(s): "2788594956"
Test #45:
score: 0
Accepted
time: 1ms
memory: 11768kb
input:
7 173828143 336914236 941275489 295810310 -887412118 -714471730 -912582442 1 2 1 1 2 2
output:
4262294468
result:
ok 1 number(s): "4262294468"
Test #46:
score: 0
Accepted
time: 3ms
memory: 11868kb
input:
7 -572833222 21134507 42426361 861990387 -480811920 230941373 544927922 1 2 3 3 5 6
output:
2755065692
result:
ok 1 number(s): "2755065692"
Test #47:
score: 0
Accepted
time: 2ms
memory: 11852kb
input:
7 -680443605 -209348563 840970142 -137922464 901658290 459523902 264391423 1 1 1 1 3 4
output:
3494258389
result:
ok 1 number(s): "3494258389"
Test #48:
score: 0
Accepted
time: 2ms
memory: 11784kb
input:
7 894515913 -285833848 200232559 -124848987 -155423899 -388397871 -738157137 1 2 1 3 4 1
output:
2787410214
result:
ok 1 number(s): "2787410214"
Test #49:
score: 0
Accepted
time: 1ms
memory: 11740kb
input:
7 -642380669 158308062 -127045342 711767901 -181174983 -826955836 -244494777 1 1 2 2 2 3
output:
2892127570
result:
ok 1 number(s): "2892127570"
Test #50:
score: 0
Accepted
time: 7ms
memory: 11808kb
input:
7 -449719640 653672153 -305651153 -120669406 801070860 856021669 75279964 1 2 3 4 5 1
output:
3262084845
result:
ok 1 number(s): "3262084845"
Test #51:
score: 0
Accepted
time: 1ms
memory: 11744kb
input:
7 -33901197 115600154 -335654692 -679018907 458398904 149062361 -984194456 1 2 2 4 3 1
output:
2755830671
result:
ok 1 number(s): "2755830671"
Test #52:
score: 0
Accepted
time: 0ms
memory: 11832kb
input:
7 516920012 53907302 586206756 495875317 -54807878 -985037423 -764269876 1 1 2 2 2 5
output:
3347408808
result:
ok 1 number(s): "3347408808"
Test #53:
score: 0
Accepted
time: 0ms
memory: 11800kb
input:
7 -565964084 527456153 -467324315 819771908 17519962 501742828 337156060 1 1 1 4 3 6
output:
3236935310
result:
ok 1 number(s): "3236935310"
Test #54:
score: 0
Accepted
time: 1ms
memory: 11836kb
input:
7 360082886 548821132 941090467 -331306340 -909347809 -760252384 403245201 1 1 1 4 5 2
output:
3447655817
result:
ok 1 number(s): "3447655817"
Test #55:
score: 0
Accepted
time: 2ms
memory: 12020kb
input:
7 272710333 -885098712 -972875130 -903355690 664838706 118735561 -377618279 1 1 3 2 3 4
output:
4195232411
result:
ok 1 number(s): "4195232411"
Test #56:
score: 0
Accepted
time: 1ms
memory: 11828kb
input:
7 786154039 -826401061 -377353790 -46394075 604493222 -496299762 -853928367 1 2 3 1 5 4
output:
3991024316
result:
ok 1 number(s): "3991024316"
Test #57:
score: 0
Accepted
time: 6ms
memory: 11772kb
input:
7 770928018 -375761964 531675212 470154520 -16031738 -208280874 -437616475 1 2 2 2 3 6
output:
2810448801
result:
ok 1 number(s): "2810448801"
Test #58:
score: 0
Accepted
time: 3ms
memory: 11824kb
input:
7 -84214608 -311721984 348213783 -342876753 -85957172 -861533199 -46214132 1 2 2 2 3 6
output:
2080731631
result:
ok 1 number(s): "2080731631"
Test #59:
score: 0
Accepted
time: 1ms
memory: 11740kb
input:
7 -832500294 654953879 519416116 -934307983 447987555 89593616 135649998 1 2 3 4 2 5
output:
3614409441
result:
ok 1 number(s): "3614409441"
Test #60:
score: 0
Accepted
time: 3ms
memory: 11828kb
input:
7 498597931 761832980 -525822554 757415894 -31882218 -376687720 415815098 1 2 3 1 5 5
output:
3368054395
result:
ok 1 number(s): "3368054395"
Test #61:
score: 0
Accepted
time: 1ms
memory: 11988kb
input:
7 777417551 -88689791 610766808 593569996 471721075 928209425 983205426 1 2 3 2 4 2
output:
4453580072
result:
ok 1 number(s): "4453580072"
Test #62:
score: 0
Accepted
time: 3ms
memory: 11772kb
input:
7 -82668280 427512696 -895819022 -34267776 -609918658 -226732333 -326014566 1 2 3 4 5 6
output:
2602933331
result:
ok 1 number(s): "2602933331"
Test #63:
score: 0
Accepted
time: 1ms
memory: 11992kb
input:
7 -458960880 595903289 -797627117 305936000 -645927332 -464394229 424697426 1 2 3 4 5 4
output:
3693446273
result:
ok 1 number(s): "3693446273"
Test #64:
score: 0
Accepted
time: 3ms
memory: 11772kb
input:
7 -148252809 -50378270 242099680 441806495 -814545811 435690931 -387541278 1 1 1 1 4 4
output:
2520315274
result:
ok 1 number(s): "2520315274"
Test #65:
score: 0
Accepted
time: 3ms
memory: 11844kb
input:
7 -300493508 730714824 150007200 -787714326 -363303020 70576704 245638013 1 2 1 2 2 5
output:
2648447595
result:
ok 1 number(s): "2648447595"
Test #66:
score: 0
Accepted
time: 1ms
memory: 11740kb
input:
7 572141031 621058836 -414583535 -460080332 -302796766 -447595524 -501020012 1 1 3 4 2 5
output:
3319276036
result:
ok 1 number(s): "3319276036"
Test #67:
score: 0
Accepted
time: 2ms
memory: 11832kb
input:
7 636941300 669915426 518932524 -279222238 -35749796 -131168660 385529662 1 2 2 2 5 5
output:
2657459606
result:
ok 1 number(s): "2657459606"
Test #68:
score: 0
Accepted
time: 7ms
memory: 11788kb
input:
7 959305738 -894258264 -347090381 -755678447 760882080 227358357 -369759016 1 1 3 3 2 1
output:
4314332283
result:
ok 1 number(s): "4314332283"
Test #69:
score: 0
Accepted
time: 4ms
memory: 11804kb
input:
7 271199002 391849726 362231609 8948327 369398379 -84046022 766040285 1 1 1 2 1 4
output:
2253713350
result:
ok 1 number(s): "2253713350"
Test #70:
score: 0
Accepted
time: 0ms
memory: 11780kb
input:
7 -309161562 833334541 174669127 461560578 -69107497 864803533 -318418581 1 2 3 2 1 4
output:
3031055419
result:
ok 1 number(s): "3031055419"
Test #71:
score: 0
Accepted
time: 3ms
memory: 11800kb
input:
7 -696916765 104246705 -505180092 -22963954 -855056222 -884673975 -382992339 1 2 3 4 4 6
output:
3452030052
result:
ok 1 number(s): "3452030052"
Test #72:
score: 0
Accepted
time: 5ms
memory: 11804kb
input:
7 393178312 -209158385 -698829444 561653374 -9113504 750689995 933099354 1 2 2 2 1 2
output:
3555722368
result:
ok 1 number(s): "3555722368"
Test #73:
score: 0
Accepted
time: 2ms
memory: 11772kb
input:
7 971427922 -556622876 296387648 -837845202 944703657 412111220 -938852992 1 2 2 1 5 1
output:
4957951517
result:
ok 1 number(s): "4957951517"
Test #74:
score: 0
Accepted
time: 4ms
memory: 11848kb
input:
7 -658568657 -291685480 -406950950 752122401 535956828 459800230 806059501 1 2 2 1 5 6
output:
3911144047
result:
ok 1 number(s): "3911144047"
Test #75:
score: 0
Accepted
time: 2ms
memory: 11832kb
input:
7 -122894494 107501180 759554708 -597194397 374886460 459973537 -387453317 1 2 2 4 5 2
output:
2809458093
result:
ok 1 number(s): "2809458093"
Test #76:
score: 0
Accepted
time: 2ms
memory: 11780kb
input:
7 -930209178 -377998490 -307953815 758169950 162476553 -260756104 -302306287 1 1 2 4 3 3
output:
2774917271
result:
ok 1 number(s): "2774917271"
Test #77:
score: 0
Accepted
time: 0ms
memory: 11772kb
input:
7 287997753 -266161909 -556628457 759728666 414851271 537990236 564321414 1 1 2 1 3 4
output:
3387679706
result:
ok 1 number(s): "3387679706"
Test #78:
score: 0
Accepted
time: 1ms
memory: 12008kb
input:
7 -138472494 -986179208 6942447 533450634 339930435 -314670096 -675445319 1 2 3 1 4 1
output:
2995090633
result:
ok 1 number(s): "2995090633"
Test #79:
score: 0
Accepted
time: 4ms
memory: 11868kb
input:
7 -463617574 -318576513 627104075 50217977 909138993 -882391811 -693881577 1 2 1 3 3 6
output:
3944928520
result:
ok 1 number(s): "3944928520"
Test #80:
score: 0
Accepted
time: 1ms
memory: 11992kb
input:
7 962834841 554185005 783725148 750403715 -838022867 -867597310 68444866 1 1 3 1 3 3
output:
4825213752
result:
ok 1 number(s): "4825213752"
Subtask #4:
score: 13
Accepted
Dependency #3:
100%
Accepted
Test #81:
score: 13
Accepted
time: 4ms
memory: 11788kb
input:
16 705094792 -616232357 -108094923 667761097 396504226 420834686 460893922 -278055196 255172815 125946652 428074698 -783191473 -60829767 -164488887 -2826756 967047548 1 2 3 4 4 6 6 5 7 4 2 5 9 1 11
output:
6441049795
result:
ok 1 number(s): "6441049795"
Test #82:
score: 0
Accepted
time: 3ms
memory: 12020kb
input:
16 -486025519 183784915 -802584378 403035079 191354191 -908089262 419437076 -22326703 -667071120 95703687 895466821 339828902 -271465920 -974609701 -36876252 150432680 1 2 1 1 1 1 7 7 2 10 11 9 13 1 4
output:
6848092206
result:
ok 1 number(s): "6848092206"
Test #83:
score: 0
Accepted
time: 1ms
memory: 12024kb
input:
16 338208929 -942211101 307179612 659467060 352008738 -600644826 -568591247 110316127 196281060 7138906 931003885 -602564915 -548401157 -432016978 522625061 -316895655 1 2 3 4 5 4 5 8 9 8 11 12 7 5 15
output:
7435555257
result:
ok 1 number(s): "7435555257"
Test #84:
score: 0
Accepted
time: 1ms
memory: 11840kb
input:
16 -899313763 294546901 -343548306 260194331 497724282 77376652 -679273509 -522484791 285239108 627670162 -100143006 742314165 -584570486 -102120138 -86180729 519443545 1 1 2 3 2 6 3 7 9 5 6 4 4 13 1
output:
6622143874
result:
ok 1 number(s): "6622143874"
Test #85:
score: 0
Accepted
time: 6ms
memory: 11808kb
input:
16 976338556 -399926725 -594520256 -249348148 -193555936 580850541 322710112 -810945200 414102012 -111164360 -520018446 -351068302 -54610814 119534412 6693390 448206798 1 1 2 2 3 2 4 7 3 9 4 4 7 9 7
output:
6153594008
result:
ok 1 number(s): "6153594008"
Test #86:
score: 0
Accepted
time: 1ms
memory: 11824kb
input:
16 679103833 573683189 358587281 321618401 -769264164 -472504416 -71519681 529204634 758179702 549779381 -816759923 854382053 -442226912 -114678422 543582908 899915622 1 1 3 4 5 6 7 1 4 3 11 2 8 5 15
output:
8754990522
result:
ok 1 number(s): "8754990522"
Test #87:
score: 0
Accepted
time: 2ms
memory: 11800kb
input:
16 -216447220 839766783 593862820 -223227169 -515587383 771527766 -640786150 -424040688 -362697827 613900535 469932206 843239980 -138608394 -29397480 -592227290 -621446160 1 2 3 4 2 1 1 1 3 10 11 3 13 14 12
output:
7463801411
result:
ok 1 number(s): "7463801411"
Test #88:
score: 0
Accepted
time: 7ms
memory: 11836kb
input:
16 -155018188 -292183835 996694358 -558722854 -250686806 608843622 975244695 -153156026 971321656 741174731 77960650 -696752425 251896012 -644861503 933941170 -74225600 1 2 1 3 1 5 3 3 2 3 4 7 13 3 6
output:
8382684131
result:
ok 1 number(s): "8382684131"
Test #89:
score: 0
Accepted
time: 3ms
memory: 11736kb
input:
16 653727953 -786557317 -943459438 -26691277 -339420493 889645810 737779068 493957724 601072620 -720213395 -71872100 747061932 -456138372 -762501798 683713450 414262727 1 2 2 4 5 1 2 4 2 2 2 12 12 11 2
output:
9328075474
result:
ok 1 number(s): "9328075474"
Test #90:
score: 0
Accepted
time: 1ms
memory: 11852kb
input:
16 -685946887 265209863 -877073465 -523555649 750392067 553279029 -861463735 -99479120 -989785837 -207308024 555917926 -200374636 -817066501 -424008798 -201581337 -334543938 1 2 1 2 1 1 4 5 9 5 8 12 13 7 15
output:
8346986812
result:
ok 1 number(s): "8346986812"
Test #91:
score: 0
Accepted
time: 7ms
memory: 11772kb
input:
16 -584731669 785757898 -886550700 511541138 -755675797 -411642499 528177179 -901914944 496986189 -997763093 608511332 925747595 39112182 -454149417 261692673 -13037234 1 2 1 3 5 5 2 8 1 1 8 12 9 14 4
output:
9162991539
result:
ok 1 number(s): "9162991539"
Test #92:
score: 0
Accepted
time: 3ms
memory: 11992kb
input:
16 -138789606 -657983472 859491002 490768513 -216693633 700253981 586625527 579190361 193321927 -144859351 -591507835 -10321324 590093735 -850375783 -531185765 715028127 1 2 1 4 1 6 1 3 5 3 10 1 3 5 1
output:
7856489942
result:
ok 1 number(s): "7856489942"
Test #93:
score: 0
Accepted
time: 1ms
memory: 11832kb
input:
16 -628505864 -722387599 916791876 66443285 -201924262 784845156 577731113 -565833840 -307792649 -495146577 724451257 242931594 894310670 -428649385 -541399884 661299052 1 2 3 4 3 3 7 8 2 10 10 6 9 14 4
output:
8760444063
result:
ok 1 number(s): "8760444063"
Test #94:
score: 0
Accepted
time: 7ms
memory: 11868kb
input:
16 -425978798 -21337767 846472240 668297537 242801553 747692852 -739406045 -75566438 -624614219 -146934481 -820992035 -804374400 -263090428 191368982 -143403842 526102378 1 2 3 1 3 6 7 2 2 10 11 3 11 10 15
output:
7288433995
result:
ok 1 number(s): "7288433995"
Test #95:
score: 0
Accepted
time: 1ms
memory: 11776kb
input:
16 345958026 -166094257 -852038492 -561405773 464257568 -499336069 -814818464 633851131 579572894 -54963110 -487200352 -893082366 540997783 -199192920 -851126607 -186508627 1 2 2 4 4 5 6 2 4 10 9 7 13 8 4
output:
8130404439
result:
ok 1 number(s): "8130404439"
Test #96:
score: 0
Accepted
time: 1ms
memory: 11740kb
input:
16 695750236 -178046448 174303514 -993882449 508423908 -210706652 -569944791 -450098231 -738117854 569307879 411591975 -113046316 -394202142 -520705996 566414548 -680457937 1 2 2 1 4 1 5 3 2 9 9 10 3 1 6
output:
7775000876
result:
ok 1 number(s): "7775000876"
Test #97:
score: 0
Accepted
time: 2ms
memory: 11776kb
input:
16 911540577 46728665 552057846 -564236701 -336399435 -282099721 -871309301 175705030 112257293 57203879 581087765 -837346177 -917563254 -773533615 276343154 138723150 1 2 1 4 2 3 7 6 3 4 7 5 13 14 12
output:
7434135563
result:
ok 1 number(s): "7434135563"
Test #98:
score: 0
Accepted
time: 0ms
memory: 11772kb
input:
16 -960871895 -502979425 990214857 10073238 -780153660 829250023 890167026 -159147718 -434224689 -343400838 -124857151 387055436 533159137 257649727 201980282 91065695 1 1 3 1 3 6 3 8 5 5 1 3 6 14 11
output:
7177955361
result:
ok 1 number(s): "7177955361"
Test #99:
score: 0
Accepted
time: 1ms
memory: 11836kb
input:
16 728295393 994812701 27878060 458671288 841106321 919316972 -340436956 891257287 810001507 122859551 135675877 -675486515 887822214 -30726545 -279576229 -59420445 1 2 3 2 5 3 2 2 3 8 11 5 10 10 15
output:
8203343861
result:
ok 1 number(s): "8203343861"
Test #100:
score: 0
Accepted
time: 0ms
memory: 11824kb
input:
16 -772084069 528226393 822093162 -599156533 -37138025 -29994514 435533676 -38584626 23997434 147656083 619337286 -945495769 636665153 808484533 501705962 397161256 1 2 3 3 1 3 7 2 9 5 10 6 10 7 2
output:
7343314474
result:
ok 1 number(s): "7343314474"
Test #101:
score: 0
Accepted
time: 3ms
memory: 11804kb
input:
16 454086574 -188981461 -615483461 609657896 609280140 -658996363 -695723892 394636347 -384757939 851747856 -909165270 351615798 700857804 669574646 885131562 301319047 1 2 1 2 3 5 1 4 6 2 10 7 7 3 7
output:
9281016056
result:
ok 1 number(s): "9281016056"
Test #102:
score: 0
Accepted
time: 1ms
memory: 11824kb
input:
16 -100886008 638479787 154724580 459785723 -783987323 -804311373 69562192 -694263043 -852456334 857035124 989257564 -624844635 -667832435 -334649534 658072282 875295165 1 1 3 3 5 6 7 8 6 10 1 6 10 14 15
output:
9565443102
result:
ok 1 number(s): "9565443102"
Test #103:
score: 0
Accepted
time: 2ms
memory: 11832kb
input:
16 756739549 -895741812 378841387 -56223569 -725379884 298935567 -276452704 905213956 207397786 244228750 481822922 -797581163 468756619 160840970 -504465752 -740562155 1 1 2 1 5 6 5 2 3 9 7 12 1 13 15
output:
7786737407
result:
ok 1 number(s): "7786737407"
Test #104:
score: 0
Accepted
time: 3ms
memory: 11740kb
input:
16 -502066643 937565716 538542511 -739956413 190799554 310321952 -117225972 -456671322 848147688 -363121968 -519269832 -734794384 108008474 -803724438 755007221 -264025800 1 1 2 2 1 4 1 8 1 4 7 3 5 14 5
output:
8189249888
result:
ok 1 number(s): "8189249888"
Test #105:
score: 0
Accepted
time: 1ms
memory: 11736kb
input:
16 815979949 -421501155 -653176809 635283920 572850279 -432513912 -350668835 447500197 -302639600 -706675183 847486840 -312103775 -705636712 -676495342 199120533 -382781489 1 1 2 4 1 2 3 2 6 2 10 2 8 2 15
output:
8462414530
result:
ok 1 number(s): "8462414530"
Test #106:
score: 0
Accepted
time: 0ms
memory: 11872kb
input:
16 170730868 -429389430 -931541194 -296909486 -338260295 -513767576 305195776 179131153 -990542224 11301848 -769142688 -528035044 -477720634 -431591472 921127419 -959187654 1 2 3 1 2 6 4 6 2 3 8 12 2 12 1
output:
8253574761
result:
ok 1 number(s): "8253574761"
Test #107:
score: 0
Accepted
time: 7ms
memory: 11772kb
input:
16 290246265 -920094830 107854872 786646225 -468288799 932011092 328852441 817408231 -639217176 633853570 61528187 972243650 -647647853 741968333 141628135 -579039385 1 2 1 3 4 6 7 6 4 10 11 8 13 8 15
output:
9068529044
result:
ok 1 number(s): "9068529044"
Test #108:
score: 0
Accepted
time: 3ms
memory: 12024kb
input:
16 -299198140 504256672 -342143694 617526823 600484031 -298846459 -339315717 556800518 -705530309 498303689 -811066832 700200577 15889035 258340403 571109881 791385444 1 2 3 4 3 6 5 5 7 8 9 8 11 12 14
output:
7910398224
result:
ok 1 number(s): "7910398224"
Test #109:
score: 0
Accepted
time: 1ms
memory: 12016kb
input:
16 -754610330 473522424 251148334 -324324052 -544657848 -837486143 34795971 79185936 237554674 539613797 180739395 555315719 -222925038 -128125202 -137238826 273722005 1 2 1 1 2 6 3 8 2 7 3 4 10 4 4
output:
5574965694
result:
ok 1 number(s): "5574965694"
Test #110:
score: 0
Accepted
time: 2ms
memory: 11740kb
input:
16 24690851 -208535417 488119606 793999715 -868011567 421762496 -81293743 614005444 882084135 -246489789 -698869739 -29609374 334665194 780682609 480560197 -872213582 1 1 3 4 4 2 2 1 3 4 11 3 1 14 10
output:
7825593458
result:
ok 1 number(s): "7825593458"
Test #111:
score: 0
Accepted
time: 7ms
memory: 11776kb
input:
16 133666816 -121152145 -341830107 -126511242 -47185581 -743230275 809735433 925508133 400222309 843538559 -51681849 -910389833 -802464350 315015789 -60048922 806503846 1 2 1 1 5 6 3 2 8 10 11 12 13 14 2
output:
7438685189
result:
ok 1 number(s): "7438685189"
Test #112:
score: 0
Accepted
time: 7ms
memory: 11796kb
input:
16 329599341 577899051 563829546 7954301 -23663859 -423180143 -691846756 543293888 -983316562 51087503 933664652 420732189 269900951 -275515986 -451672900 -516061974 1 2 2 3 2 5 7 3 1 7 10 5 9 5 10
output:
7063219602
result:
ok 1 number(s): "7063219602"
Test #113:
score: 0
Accepted
time: 3ms
memory: 11848kb
input:
16 5478417 778891577 -182846102 -171308642 919583531 953223865 539731022 -233821820 -395672903 -777429849 -271747405 967499742 -437948573 -931930013 -254956915 -313447443 1 2 1 4 2 5 6 2 1 1 8 2 4 11 2
output:
8135517819
result:
ok 1 number(s): "8135517819"
Test #114:
score: 0
Accepted
time: 3ms
memory: 11776kb
input:
16 -583538404 -562090376 28237467 729354755 -475041778 -352462724 493847870 -444666681 -394823916 170207786 909025936 -908045824 781874962 78862542 16735798 125585522 1 1 3 4 4 4 5 5 8 6 7 7 13 14 6
output:
7054402341
result:
ok 1 number(s): "7054402341"
Test #115:
score: 0
Accepted
time: 1ms
memory: 11776kb
input:
16 -561583942 997093169 -536213600 87570286 713681322 -995589010 -654706200 -551960524 60250808 -704049387 -216948907 991783378 670271535 -671334637 375783277 -666337113 1 2 1 4 1 4 4 2 9 4 11 3 4 3 14
output:
9455157095
result:
ok 1 number(s): "9455157095"
Test #116:
score: 0
Accepted
time: 1ms
memory: 11800kb
input:
16 287014820 -175000539 -379986162 783251360 -548938361 996692969 -717194274 32342345 -30729626 233024862 362928016 -20258053 -473756142 695228941 981860260 -545949070 1 1 3 1 5 1 2 6 5 8 11 3 13 2 3
output:
7264155800
result:
ok 1 number(s): "7264155800"
Test #117:
score: 0
Accepted
time: 3ms
memory: 11736kb
input:
16 249040588 459602282 297384003 -299452994 -796369180 782752454 -475181608 -22642786 -767781943 850892974 -826028391 631609842 222319690 -981677075 71797846 656576619 1 1 1 3 2 4 7 7 6 8 4 10 2 7 3
output:
8391110275
result:
ok 1 number(s): "8391110275"
Test #118:
score: 0
Accepted
time: 6ms
memory: 11868kb
input:
16 -2838216 340153 713105429 -824251767 171353897 -820985788 581267725 -982852367 56299717 580147698 -872169730 -940033296 207944229 534228447 -36228588 272978510 1 2 2 3 5 1 4 8 8 8 2 12 11 14 12
output:
7597025557
result:
ok 1 number(s): "7597025557"
Test #119:
score: 0
Accepted
time: 3ms
memory: 12020kb
input:
16 153018023 241686138 -52408475 -392180854 -912731532 -215263365 -542798479 675371932 -198000656 4330271 -612913714 -83275352 -761977287 681381907 738734136 -567228456 1 2 1 4 5 5 2 3 6 10 11 12 4 11 10
output:
6833300577
result:
ok 1 number(s): "6833300577"
Test #120:
score: 0
Accepted
time: 6ms
memory: 12016kb
input:
16 -112800397 -905572872 -277422687 -381580900 350628202 138284168 813583764 -120186629 -980487129 452688916 10376554 753448253 552380259 517835372 750905939 -802107805 1 1 3 2 1 6 5 6 4 6 4 3 12 5 12
output:
7920289846
result:
ok 1 number(s): "7920289846"
Subtask #5:
score: 22
Accepted
Dependency #4:
100%
Accepted
Test #121:
score: 22
Accepted
time: 0ms
memory: 11812kb
input:
100 -726952699 -90634664 325373211 -843632790 586905321 738915710 -332541440 -840886232 -718312998 604457381 -403884342 -537459643 -104704322 820433427 -683727053 -761237034 -214608038 863438526 847276894 -265396231 -643564993 250836177 -654904735 830571018 -520404755 502911366 -366976270 651820877 ...
output:
53325292694
result:
ok 1 number(s): "53325292694"
Test #122:
score: 0
Accepted
time: 1ms
memory: 11800kb
input:
100 -559943255 411444354 360984135 -749814781 394905415 49684055 135161015 -127194661 225890164 398122277 -204893593 513513689 -103978961 -880972258 -738405315 -921601007 471083823 -664783321 -621089555 469332510 210680924 811123212 695110106 104024121 -339044649 597275218 -998676851 341585375 -7064...
output:
50951091192
result:
ok 1 number(s): "50951091192"
Test #123:
score: 0
Accepted
time: 1ms
memory: 11788kb
input:
100 463520470 494847254 -519968303 691743075 40833407 -379769876 579095471 830626381 -515951935 -30520376 -881476887 -489348746 -660299158 430345420 -495398469 -960323166 26367608 852276074 282760551 753415086 269062731 264297136 274406174 -126027799 5550842 -729825264 -848689602 865951643 379453629...
output:
48377436440
result:
ok 1 number(s): "48377436440"
Test #124:
score: 0
Accepted
time: 1ms
memory: 11816kb
input:
100 -287801645 926499336 681214062 968242536 -233542434 -282317091 844023437 -784041181 657017912 167529037 -136461232 -343746846 191698656 644314751 -268534741 -836410720 -577167021 -835697312 189835847 791912186 -407534654 -704554034 327506311 528647770 -887720432 -367644533 395611425 487003825 29...
output:
46742418917
result:
ok 1 number(s): "46742418917"
Test #125:
score: 0
Accepted
time: 1ms
memory: 11836kb
input:
100 69227742 660022722 482909702 -403408884 995008067 482701576 -687531127 691945739 -249906633 705428639 305126055 -960736726 -759016757 24345124 713561070 50901126 -417934204 374863432 171175487 -307425763 877005358 437739979 673108801 979044892 -540712371 644820895 545282345 278143208 -310138319 ...
output:
48268843975
result:
ok 1 number(s): "48268843975"
Test #126:
score: 0
Accepted
time: 3ms
memory: 12032kb
input:
100 669874140 797458360 491218739 -126377328 162709871 851904182 -946548524 -421884900 -89475280 -255301509 -384130079 -520510426 -806152984 970606391 360092640 264455909 -461577734 366948722 -21389381 482436448 385693266 711657591 38833393 14910817 -868038682 451880405 -555783660 847901527 -8201960...
output:
52740131675
result:
ok 1 number(s): "52740131675"
Test #127:
score: 0
Accepted
time: 1ms
memory: 12032kb
input:
100 -974276687 -125740452 139835861 851427276 -176591282 -673423831 -643600383 711694573 -696185571 390416426 -388085783 774738795 -845526711 114622533 475319713 618336965 955872232 16415446 254584920 -192506320 -938551222 837400602 -595096402 -482932841 210105865 229628370 -574508259 906655025 -534...
output:
51839615834
result:
ok 1 number(s): "51839615834"
Test #128:
score: 0
Accepted
time: 7ms
memory: 12000kb
input:
100 95666920 -752637944 939281181 684172921 -460589053 -641912313 -842867589 -287062421 -809730784 -960321085 189734469 -681658486 -829254132 -86933663 -799211003 639612267 -914795381 311056178 937598080 530990623 169575718 114916584 797312895 745993062 459955256 -78902216 -971030533 167367483 91509...
output:
50164474883
result:
ok 1 number(s): "50164474883"
Test #129:
score: 0
Accepted
time: 3ms
memory: 11852kb
input:
100 218109522 -938171957 -197288885 317722680 646320806 -640609738 551004346 308416868 89760358 602594203 -15649106 -934807628 777406572 907606743 958427500 181186775 674398076 665821636 576619616 706357288 804380218 -152057548 -238319699 -395261752 -242064753 582728918 -574428037 -468161813 6143507...
output:
53776538602
result:
ok 1 number(s): "53776538602"
Test #130:
score: 0
Accepted
time: 2ms
memory: 11812kb
input:
100 -764363717 -86175228 -92169146 178926910 -404266245 -440971630 184089387 695314648 -508277911 731329999 -280689224 -59874586 -816239402 -69945467 -321363389 -944415085 -790726762 -66872844 -495832480 62158694 288768683 978331526 518566806 -979696606 83215795 61850076 253590985 -896319487 -156182...
output:
46052671906
result:
ok 1 number(s): "46052671906"
Test #131:
score: 0
Accepted
time: 6ms
memory: 11844kb
input:
100 -792484664 897462034 -212612741 -757839475 593027746 711137638 205514087 -615009146 -723710636 -870803699 -489383213 472679668 -304157969 -456468723 -294738676 20753310 122744428 -47767530 824337687 -127445345 213432592 -294033495 730752110 115906361 -197889910 449127848 -307876915 323849996 -86...
output:
48271195409
result:
ok 1 number(s): "48271195409"
Test #132:
score: 0
Accepted
time: 2ms
memory: 11792kb
input:
100 92151318 470374356 964634161 422632463 -401794147 -948958259 -697691815 -307421568 648773021 -945105880 -558067714 -492439029 -734488063 -426414763 552975456 402801587 905875092 191078673 -207688756 -531772820 -680580592 600219519 736749664 364773934 271251564 -28295197 -291241082 686518616 2107...
output:
51338958353
result:
ok 1 number(s): "51338958353"
Test #133:
score: 0
Accepted
time: 3ms
memory: 11784kb
input:
100 41433950 -189228916 -916049365 -878951932 398645477 -395626953 453775654 -266114836 -622371817 -870158507 293826743 -135524073 42725503 -404312715 -914828557 129188479 -775661598 456166223 838503570 -675341887 -721685784 -924019970 744391668 -960756542 -960475675 -409326575 514326040 544498675 8...
output:
52195239377
result:
ok 1 number(s): "52195239377"
Test #134:
score: 0
Accepted
time: 1ms
memory: 11816kb
input:
100 278585538 402483270 211240901 867087231 682013792 -319226984 655141840 -285250632 -159355392 -550006809 -890469305 -748803307 -819377160 460750416 -728449329 -986181127 -224146322 426805009 -458392843 -272704543 582423938 -331677892 607623102 -900584021 537463546 -150816488 -731018308 -557135016...
output:
48653348268
result:
ok 1 number(s): "48653348268"
Test #135:
score: 0
Accepted
time: 4ms
memory: 11852kb
input:
100 374244996 -137947491 -17256751 808169319 713000613 -130980406 665949423 760211246 39619843 569180353 -328461508 888702023 -704243801 -186655703 -663316908 -291819409 -441795098 -867804363 256499618 408354743 -59538542 -355105708 738678885 680898701 -799803779 735302716 -42258392 96010490 6715278...
output:
47123092129
result:
ok 1 number(s): "47123092129"
Test #136:
score: 0
Accepted
time: 1ms
memory: 11808kb
input:
100 474512448 236942051 -468708287 -239254928 -928943075 -928269894 975527963 -906873650 330165237 -582823945 -74005992 -78369497 -523881754 30611775 905252277 -424337803 -515216689 844688592 326495173 531644938 667714958 -28341981 510670985 548019767 -254170116 -476076782 -784544735 -544791904 -540...
output:
51915018473
result:
ok 1 number(s): "51915018473"
Test #137:
score: 0
Accepted
time: 1ms
memory: 11752kb
input:
100 764135724 -321977278 888016949 -590635989 291509764 404680975 227365922 -717647074 457132790 851767022 51924872 552327320 435272128 705725534 -908910762 -631832190 -602428549 -10184134 93196763 -681303406 974066200 -435776761 811276597 153716535 852278915 -82778118 -883438321 -889941675 -5338339...
output:
51124687797
result:
ok 1 number(s): "51124687797"
Test #138:
score: 0
Accepted
time: 3ms
memory: 11784kb
input:
100 -720048124 -628249017 -912589732 545364090 -665840436 -969985830 999970300 -531633932 -73397137 -864203406 -562051536 -913787981 -768696376 206480513 -924805302 -473993712 -773413580 -512153204 -396095848 659172608 -666814326 -702962588 -170874430 574916101 -867844130 -715142564 540049544 196107...
output:
56717883988
result:
ok 1 number(s): "56717883988"
Test #139:
score: 0
Accepted
time: 2ms
memory: 11844kb
input:
100 -776788244 23903050 -354271002 -51767960 123531346 -188240042 42929548 947347245 -297298539 111322037 -923914840 -952706849 -223869422 387021543 -960580817 601330074 -1986844 229003100 -950529541 328439496 853470875 276741837 295327044 574574022 892716787 -344591200 664147617 -155852380 95729785...
output:
49826621078
result:
ok 1 number(s): "49826621078"
Test #140:
score: 0
Accepted
time: 6ms
memory: 12032kb
input:
100 111999530 464405619 -731832569 -154794112 670599197 763134440 452358760 -475061388 -773663240 400358779 -810893951 879401246 -45077732 765350230 -371246828 -168396719 959073048 -956944618 519403406 -239194044 702739251 38809596 203309553 538101880 984106503 -122262754 -458420406 93693532 -957174...
output:
50971025332
result:
ok 1 number(s): "50971025332"
Test #141:
score: 0
Accepted
time: 1ms
memory: 11804kb
input:
100 92300604 513218093 523963478 -667424725 690902623 32809280 -703605786 456085982 -164920045 642963404 -213268549 837678968 126234886 -289038128 -459690542 107557149 -806473890 -880703444 185374253 769902877 -42065484 -59447567 -414268546 208378633 -423422759 268912732 847196285 -409608599 6715037...
output:
42863873338
result:
ok 1 number(s): "42863873338"
Test #142:
score: 0
Accepted
time: 3ms
memory: 11796kb
input:
100 676229840 -119322672 192810074 -963551939 47292911 -531471847 -657388307 165119985 355582396 448594125 83413569 618463632 -937061866 570724116 191871547 753657336 99466512 -32887717 -357234685 -681445033 -999501473 -126033481 -412426740 -139528922 242857142 182944911 -871654840 325518149 1037638...
output:
48301706917
result:
ok 1 number(s): "48301706917"
Test #143:
score: 0
Accepted
time: 1ms
memory: 12028kb
input:
100 929652070 -995760366 -718236056 -648313487 729404071 622272534 730552389 -343032899 -698524108 357209907 -938686279 -63090625 -539339530 -932603519 -774119694 310800317 256103954 -938807961 395753800 -550829710 963511666 -139449174 -850564258 -30309940 423521512 -8705774 -312560222 -516365310 35...
output:
49010701262
result:
ok 1 number(s): "49010701262"
Test #144:
score: 0
Accepted
time: 3ms
memory: 12000kb
input:
100 728248008 -466819136 -924368641 -132518546 -176955969 -36969169 956494249 929509709 -220851981 -771802980 38401369 219115746 879679917 771241825 271415336 -688655405 526707954 -798921911 356049388 -905728499 676199388 -636037820 830156676 -20949711 -342439195 95895977 497967878 -57038702 4980877...
output:
49289530114
result:
ok 1 number(s): "49289530114"
Test #145:
score: 0
Accepted
time: 1ms
memory: 11880kb
input:
100 -149904903 -377610652 -382374081 -555685902 -174175488 -353884247 -111109294 -601477469 467889575 355947138 881304367 559057889 -129178508 -208343619 -783954720 -757062980 147866594 544644173 1921930 657389957 -579109692 -901550305 -91917379 -153258388 -4773764 -509510669 290522207 737723917 -88...
output:
49222227937
result:
ok 1 number(s): "49222227937"
Test #146:
score: 0
Accepted
time: 2ms
memory: 12004kb
input:
100 -197374829 916368781 87269611 379748212 546946252 -262853455 -395775857 165906027 -167736301 -987463003 -662709253 909942254 -31312198 -368623175 -807657726 -91778255 -726656290 218159072 29971606 -975079895 -480907771 56045141 -582220821 825540067 -912426626 137378172 -21097052 548233259 263055...
output:
49244229686
result:
ok 1 number(s): "49244229686"
Test #147:
score: 0
Accepted
time: 4ms
memory: 11804kb
input:
100 174816476 -300839514 -819016069 323205623 -365505359 -402204619 -450991339 651731450 913806940 -50958921 -311311438 602425182 -237072986 -505691251 401921055 941176698 594675956 896373505 -508422981 -36825069 348693029 -654770341 -877779349 565583244 -40764546 974385968 944321595 -883938220 1367...
output:
50235280096
result:
ok 1 number(s): "50235280096"
Test #148:
score: 0
Accepted
time: 2ms
memory: 11796kb
input:
100 -956801454 897360270 361695028 267133271 907099834 -313351422 -742867240 -460572483 792396170 534167388 -323437157 -824663369 -552360514 185648041 621205391 -487016945 975946121 -614176561 -535799571 958329329 -300630756 -639501713 -636405592 -312031010 591926793 864614493 514333609 474230798 95...
output:
51043213620
result:
ok 1 number(s): "51043213620"
Test #149:
score: 0
Accepted
time: 2ms
memory: 11784kb
input:
100 -821668141 -48932470 -159675110 -909964397 -19537408 -793346948 -191122559 85228729 671158992 -738109274 142375564 596505695 -670731085 -210246514 -687262591 -212065273 -883832959 43071123 -195385565 47799298 964410253 187435830 83893976 326052278 -682270060 885465475 -84341911 -155270330 934564...
output:
45306013403
result:
ok 1 number(s): "45306013403"
Test #150:
score: 0
Accepted
time: 1ms
memory: 11876kb
input:
100 308045532 -819910833 588544819 814807929 -903834305 98569024 951204074 -564784216 -169619575 -918916634 -102537463 125258061 -538348353 626598521 303440973 778065053 -752768362 -231244975 728005140 71068843 255325008 -101952873 41897200 -880460313 -506572442 -860396163 -584494923 71034005 561060...
output:
49698077852
result:
ok 1 number(s): "49698077852"
Test #151:
score: 0
Accepted
time: 7ms
memory: 11812kb
input:
100 482105260 900404600 519510245 -596016906 -215288440 20496522 854507544 130406883 900528663 689489867 290463283 404714219 -959357649 -920384909 205656918 744223827 490667176 899085426 442092503 645841594 358223654 957570058 -99554637 -460029476 -346725626 420007360 -71924540 882595246 164140752 -...
output:
50468606195
result:
ok 1 number(s): "50468606195"
Test #152:
score: 0
Accepted
time: 1ms
memory: 11796kb
input:
100 -172053345 -943228732 -936419084 11464219 339913124 -672685820 406592847 394098658 40583908 -6511974 686993263 -368117931 -281817310 715382914 941590663 -859195213 638581972 665615993 997788695 -933702779 -292543548 415022187 251585853 730540541 -650065498 -181625997 -846666796 -810377250 -67779...
output:
54803924238
result:
ok 1 number(s): "54803924238"
Test #153:
score: 0
Accepted
time: 1ms
memory: 12024kb
input:
100 506220605 83114311 810122130 939044061 511157552 916477184 -418635776 -956501820 576732625 577886457 681943442 -952041156 13209348 747869247 -63018913 597944558 -557136967 219718686 -96145594 824249508 -604052080 409801112 -199762740 -554608029 -647557582 490733723 745997545 -729457171 -66977747...
output:
50976271161
result:
ok 1 number(s): "50976271161"
Test #154:
score: 0
Accepted
time: 1ms
memory: 11808kb
input:
100 -69206057 -967890717 999706861 -751482875 886352534 87201278 100933161 -40089957 -563013044 739681695 111021089 885505942 91229709 -976621598 -230837978 245839317 -128668964 205365195 -567219104 -570517653 419255788 -276416068 566428557 -649284168 -394176160 -738115019 808646537 -772120660 -7771...
output:
47331447587
result:
ok 1 number(s): "47331447587"
Test #155:
score: 0
Accepted
time: 0ms
memory: 12036kb
input:
100 697163923 467439754 214625528 458009047 -750901393 162989898 711732174 671329415 652287901 278609383 -481015897 -38083769 -565313492 813624877 -991118478 -103634485 -956120121 -678519034 828343282 353012300 -761545000 -213583019 -57542648 -59277383 942268974 -444057968 -680885254 451728726 85970...
output:
50751588314
result:
ok 1 number(s): "50751588314"
Test #156:
score: 0
Accepted
time: 3ms
memory: 12028kb
input:
100 89384693 -919017235 -764034928 400059660 534845777 193034103 -438466765 -619961755 90634566 -577496727 20553164 -223592153 -881357925 965887884 -262268891 232516688 26162846 847533059 -324496383 -693591360 -955622195 -674546435 -307981988 176095852 -305181139 -720547192 705818180 525238095 61170...
output:
50701292963
result:
ok 1 number(s): "50701292963"
Test #157:
score: 0
Accepted
time: 1ms
memory: 11792kb
input:
100 -4837430 -677132073 436922929 477350831 -992461806 -899345084 -596406530 -597752079 911047101 -806653409 -339389511 -671196038 933207586 -444554352 889393488 167929569 457631155 617411520 118129513 96610819 -979733140 -170764468 -858862108 377983974 -346346146 -123029177 -105787808 -917358025 -7...
output:
52128531691
result:
ok 1 number(s): "52128531691"
Test #158:
score: 0
Accepted
time: 1ms
memory: 12024kb
input:
100 969209369 813040273 -753374229 779880669 -560572589 -738716234 442244568 -71109895 -127402699 -872281188 -885867014 -729454990 -487364264 -217865140 755184889 -771152401 -6069095 -761872706 413682391 -78240894 46977534 -930841032 396027597 905311324 -64058815 662555531 403393883 -891250567 25269...
output:
48367319332
result:
ok 1 number(s): "48367319332"
Test #159:
score: 0
Accepted
time: 1ms
memory: 12028kb
input:
100 399799762 827055573 862078781 955004143 581637396 -570688220 978657889 -728609521 -535258319 -412707589 -489633836 -57481404 -194278415 -566542162 -110373137 124709841 717622982 -287756764 757833519 -950555921 714366652 -949653422 72915871 -868237225 -893507567 890739522 -428818887 782831669 486...
output:
52680606032
result:
ok 1 number(s): "52680606032"
Test #160:
score: 0
Accepted
time: 1ms
memory: 11748kb
input:
100 536548271 -92386041 -371130626 978776655 -480237797 -18247893 -137068260 451547489 -319621890 382103575 722256387 -389048747 525134698 -407873685 -833906879 722973253 -977502727 -663905835 999350409 543938229 772062138 983997450 -312040659 -736290733 530461486 -829531241 725075093 -108692671 277...
output:
53847720594
result:
ok 1 number(s): "53847720594"
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%