QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#28114 | #3584. Daily Turnovers | Retucl# | WA | 293ms | 104800kb | C++14 | 3.0kb | 2022-04-12 08:29:28 | 2022-04-29 08:57:00 |
Judging History
answer
#include<bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fir first
#define sec second
#define modPrepare() \
void Add(int &x,int y){(x+=y)>=Mod?x-=Mod:x;}\
void Del(int &x,int y){(x-=y)<0?x+=Mod:x;}\
int Pow(int a,int b){\
int res=1;\
while(b){\
if(b&1) res=1ll*res*a%Mod;\
a=1ll*a*a%Mod,b>>=1;\
}\
return res;\
}
#define facPrepare(_) \
const int len=_;\
int Fac[len+10],Iac[len+10]; \
void facInit(){\
Fac[0]=Iac[0]=1;\
for(int i=1;i<=len;++i) Fac[i]=1ll*Fac[i-1]*i%Mod;\
Iac[len]=Pow(Fac[len],Mod-2);\
for(int i=len-1;i;--i) Iac[i]=1ll*Iac[i+1]*(i+1)%Mod;\
}\
int Binom(int x,int y){return x<y?0:1ll*Fac[x]*Iac[y]%Mod*Iac[x-y]%Mod;}
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef pair<int,int> pii;
void read(int& x){
static char c;int f=0;
while(!isdigit(c=getchar()))
if(c=='-') f=1;
x=c^48;
while(isdigit(c=getchar())) x=(x*10)+(c^48);
if(f) x=-x;
}
void read(ll& x){
static char c;int f=0;
while(!isdigit(c=getchar()))
if(c=='-') f=1;
x=c^48;
while(isdigit(c=getchar())) x=(x*10)+(c^48);
if(f) x=-x;
}
void read(uint& x){
static char c;
while(!isdigit(c=getchar()));x=c^48;
while(isdigit(c=getchar())) x=(x*10)+(c^48);
}
void read(ull& x){
static char c;
while(!isdigit(c=getchar()));x=c^48;
while(isdigit(c=getchar())) x=(x*10)+(c^48);
}
void chkmax(int& x,int y){if(y>x)x=y;}
void chkmin(int& x,int y){if(y<x)x=y;}
void chkmax(ll& x,ll y){if(y>x)x=y;}
void chkmin(ll& x,ll y){if(y<x)x=y;}
void chkmax(uint& x,uint y){if(y>x)x=y;}
void chkmin(uint& x,uint y){if(y<x)x=y;}
void chkmax(ull& x,ull y){if(y>x)x=y;}
void chkmin(ull& x,ull y){if(y<x)x=y;}
const int N=5e5+10;
int X,n;
ll A[N],S[N];
int sta[N],R[N],D[N],top;
int _lg[N];
ll st[N][21];
void Init(){
memset(st,-0x3f,sizeof st);
for(int i=2;i<=n;++i) _lg[i]=_lg[i>>1]+1;
for(int i=1;i<=n;++i) st[i][0]=S[i];
for(int B=1;B<=20;++B)
for(int i=1;i+(1<<B)-1<=n;++i)
st[i][B]=min(st[i][B-1],st[i+(1<<B-1)][B-1]);
}
ll Ask(int l,int r){
int k=_lg[r-l+1];
return min(st[l][k],st[r-(1<<k)+1][k]);
}
void Work(){
read(X),read(n);
for(int i=1;i<=n;++i) read(A[i]);
for(int i=1;i<=n;++i) S[i]=S[i-1]+A[i];
Init();
sta[++top]=0;
for(int i=0;i<=n;++i) R[i]=n+1;
for(int i=1;i<=n;++i){
while(top&&S[i]<S[sta[top]]) R[sta[top--]]=i;
sta[++top]=i;
}
ll tmp=0,Ans=0;
for(int i=0;i<n;++i) tmp+=R[i]-i-1;
Ans=tmp;
for(int i=0;i<n;++i){
int l=i+1,r=n,mid,res=n+1;
while(l<=r){
mid=(l+r)>>1;
if(Ask(i+1,mid)+X<S[i]) res=mid,r=mid-1;
else l=mid+1;
}
D[i]=res-R[i];
}
priority_queue<pii,vector<pii>,greater<pii>> Q;
for(int p=1;p<=n;++p){
Q.push({R[p-1],p-1}),tmp+=D[p-1];
while(Q.size()){
auto o=Q.top();
if(o.fir>=p) break;
Q.pop(),tmp-=D[o.sec];
}
chkmax(Ans,tmp);
}
printf("%lld\n",Ans);
}
int main(){Work();}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 4ms
memory: 89788kb
input:
1 6 1 1 -2 1 3 -5
output:
13
result:
ok single line: '13'
Test #2:
score: 0
Accepted
time: 29ms
memory: 90488kb
input:
88 48799 -29 51 -94 23 100 -44 -49 -71 99 39 -42 45 65 -28 78 -72 -28 -34 53 -88 78 -46 27 73 56 -13 72 66 11 -55 -1 -44 -24 -28 18 79 31 100 -53 -88 41 70 8 85 -6 78 -50 -43 57 -7 -32 -96 -69 58 -58 21 65 -98 19 57 25 35 8 -88 -41 62 -44 72 -23 61 53 -23 -45 -35 -7 47 47 40 66 -10 23 -24 -97 -92 20...
output:
11252741
result:
ok single line: '11252741'
Test #3:
score: 0
Accepted
time: 100ms
memory: 94184kb
input:
-692982840 189297 -319880894 165778290 -804292010 -905153678 -141539645 744104341 -592456751 45240119 -792186907 142335460 614999455 -214843257 -836389022 288401576 378694316 849003582 -384735495 628858044 454261201 449558021 945257935 -818780631 -935871293 -248039091 -908247714 -810028298 -18310377...
output:
29236338
result:
ok single line: '29236338'
Test #4:
score: 0
Accepted
time: 86ms
memory: 96248kb
input:
-847081208 201777 -362342902 950538897 170409400 354851727 724412466 -555164993 431472288 -402948810 511594694 651665414 200017472 306904258 451470872 367316021 217115121 740714342 -492867023 905716166 -769017028 -478302606 -258209227 566281439 809251360 -356674022 -525604385 -199460024 -413953914 -...
output:
99422567
result:
ok single line: '99422567'
Test #5:
score: 0
Accepted
time: 250ms
memory: 99860kb
input:
-46689617 468654 -873608239 844369497 -586342166 87244063 487246974 -30920724 130461290 872852725 713049323 -897961405 -224206400 -120538066 -384818301 -813867084 714125604 535003985 842837347 685415357 816352739 -81481393 -669897434 -496368655 -837871108 -263338207 867165429 479080381 -258478354 -4...
output:
325205671
result:
ok single line: '325205671'
Test #6:
score: 0
Accepted
time: 65ms
memory: 95928kb
input:
-105024314 163130 399674258 189278497 -570171557 573121394 437349803 713633701 393808694 -453852681 -787237756 -767295024 848259499 473139355 -402247363 715760936 444643380 710777004 -521668817 528953523 944981793 -736461629 169934543 -987916260 -355504488 618029850 973830329 999300082 508244142 566...
output:
43132865
result:
ok single line: '43132865'
Test #7:
score: 0
Accepted
time: 125ms
memory: 96800kb
input:
-669308097 250859 -30957923 -815495614 993038014 -886997997 206435672 -296683788 -501369159 -254681816 650312002 -832243057 -203302371 -810582727 486472638 588596060 296106971 352203572 -740414374 166062741 -182542463 -576531936 881035288 522504094 -558279511 -112954183 -640498286 -236782124 5590322...
output:
43429561
result:
ok single line: '43429561'
Test #8:
score: 0
Accepted
time: 186ms
memory: 98408kb
input:
-415865574 373402 537337034 -775449577 -986685122 -415417439 -427343772 882493829 -187997993 990453306 213987186 769635852 -730612457 -636502154 166201993 -349188123 -24615725 459127269 615688966 -733987113 -317247258 -334534978 253617848 492071220 470724675 -573696637 -113167646 227055072 -46147828...
output:
209225802
result:
ok single line: '209225802'
Test #9:
score: 0
Accepted
time: 146ms
memory: 97912kb
input:
-984904548 332557 848322713 -583914591 756630309 779011645 -425502784 699827041 64275178 -880171172 -534031531 -911460107 612260787 974173341 714983930 -227425470 -631004899 495075429 985906938 -408858677 536841560 917582465 -600114146 -754974084 718709902 834494811 227599319 53754380 -840427573 805...
output:
55145126
result:
ok single line: '55145126'
Test #10:
score: 0
Accepted
time: 40ms
memory: 92668kb
input:
-874480785 64520 -568141258 -492904441 -702443562 -739990261 925188732 831347318 123434742 -473296046 -376808574 776449962 149742619 -333724977 -585465734 355455841 -639240780 661131574 -220739797 101459511 749085594 -316085814 679136591 512664698 -39847220 403513372 17697173 189427865 -948945991 -1...
output:
12828522
result:
ok single line: '12828522'
Test #11:
score: 0
Accepted
time: 34ms
memory: 91160kb
input:
-844462533 113704 951387629 -789228011 -67659437 229227600 858431468 -11859968 133998376 -980867902 -809257080 -156771729 570219542 230262976 606047982 505316601 -207267564 55124942 497651928 75450099 -391929961 -866579009 -766802245 -775940721 827975501 -736069973 -341642708 626585175 -482032827 -4...
output:
36648253
result:
ok single line: '36648253'
Test #12:
score: 0
Accepted
time: 122ms
memory: 97252kb
input:
-639094816 282990 487052011 -688641544 630504506 352924261 -418550232 727183537 -962676115 81914054 650345945 -152960350 -114364795 579870981 687372350 -358401273 -245857985 -691453144 164830123 -430830549 -790051168 -656478422 139768265 -255714057 233580342 690423501 -551976520 -534428518 -82152138...
output:
53730890
result:
ok single line: '53730890'
Test #13:
score: 0
Accepted
time: 72ms
memory: 96432kb
input:
1 205998 63 -55 5 81 -60 -24 -74 32 -57 0 3 98 32 -12 -93 39 36 -60 -14 -53 -90 -48 -50 2 -60 26 0 92 3 -80 83 72 9 -53 8 -88 84 56 -22 -44 -8 -33 94 49 10 -3 -68 84 -58 70 98 -10 34 5 13 48 60 68 25 -79 -2 -15 71 23 79 82 99 -39 8 51 -8 -49 -86 -43 -57 9 47 -28 55 85 18 -62 -46 13 42 30 -45 52 -99 ...
output:
29514987
result:
ok single line: '29514987'
Test #14:
score: 0
Accepted
time: 160ms
memory: 97844kb
input:
-860057994 338805 -121717271 289169652 100623933 632828260 639632866 -968616101 -845994380 485160188 -637608241 387990137 857691217 439507774 44333041 -729956628 -967429360 400748320 -693822734 88912002 304373898 -83105861 766149072 -823501469 935740502 996141753 740927 646458829 690788363 521631053...
output:
163968521
result:
ok single line: '163968521'
Test #15:
score: 0
Accepted
time: 20ms
memory: 90088kb
input:
-438024235 20846 883920232 57654665 324722295 -624176905 -655958558 495671430 443793401 746502299 -938444280 -357527306 709870564 836501010 38946484 804861354 -216112611 210972054 957336935 577585608 -335640215 -34239864 -799442741 116452497 479654663 583696122 101830896 339665244 -923333155 8098343...
output:
1906850
result:
ok single line: '1906850'
Test #16:
score: 0
Accepted
time: 51ms
memory: 95072kb
input:
-984823050 86364 -576401231 136397105 -449039691 -730522380 -970873197 -875545444 638806254 -153729061 960295318 700602544 -362743648 410720329 -177150127 759428603 -1227119 406746096 770040418 -316244723 -154913818 185390022 -76845491 -199990369 -92323329 -987024726 -788599140 -554632205 -221098497...
output:
12460624
result:
ok single line: '12460624'
Test #17:
score: 0
Accepted
time: 174ms
memory: 96196kb
input:
-642386998 326758 -667998316 532875866 650367814 664181383 609784634 175396744 504496384 528275131 903218059 662163322 -976061604 -37165541 538278415 98030378 580260172 515255468 -732843779 -475901612 228445267 -14662672 -927246352 -289452128 -273207171 -999881039 -478170467 351183113 138869608 4201...
output:
56946960
result:
ok single line: '56946960'
Test #18:
score: 0
Accepted
time: 66ms
memory: 95720kb
input:
-345137235 155576 -260615762 -806964557 -304134533 644948627 -264683691 190569731 -635967569 -796187555 -620846071 797136062 263534689 984294000 -643012106 606621092 93997008 -729959850 -771112748 113144210 -220477488 -944789196 504239760 182809731 -418737391 -659768483 379698641 647065820 68464820 ...
output:
37917384
result:
ok single line: '37917384'
Test #19:
score: 0
Accepted
time: 19ms
memory: 92320kb
input:
-329648984 38916 -493771958 -74657704 -336479320 -718294330 -416303312 275179952 143304929 308213353 -501112885 -745239790 -120525641 160701254 340911388 284209528 -286894197 -675549053 744090318 -155118674 111824372 -664936194 381672413 -140296064 -685466037 -569206214 -273993849 -543862846 -624164...
output:
33406
result:
ok single line: '33406'
Test #20:
score: 0
Accepted
time: 130ms
memory: 96228kb
input:
-646248790 330204 -707692191 619122474 681123489 -478584900 377895747 255010083 -281909827 -594240804 -602296129 -113540068 836305497 -972607414 612412518 -114858261 -796524203 -163122186 -219890028 418621736 -501927094 -877594077 470892163 -425025843 757811163 -33291618 -795538751 -842411265 -20187...
output:
279465
result:
ok single line: '279465'
Test #21:
score: 0
Accepted
time: 107ms
memory: 97064kb
input:
-28126747 268155 299095251 -732879679 -775628231 -430061266 -618129103 -573687885 -715864837 289717221 149110084 -64054250 -536243842 -255336671 -951487943 -557220502 -522853211 562250787 -968372503 -908617511 592235025 -866880459 975436327 -185873520 623427983 -127463203 -748696203 -99467674 -50415...
output:
226567
result:
ok single line: '226567'
Test #22:
score: 0
Accepted
time: 21ms
memory: 90268kb
input:
-705229182 31714 -531155619 -773715209 454337296 -780860135 -981746203 627077753 -744825216 -789693806 -917497601 776980223 -854288473 188986450 -876502100 461182330 761331637 602957049 -776501719 -444938349 -213034758 133659860 -300686839 -230277889 -69393738 103470536 -382195907 -912609709 9786864...
output:
26374
result:
ok single line: '26374'
Test #23:
score: 0
Accepted
time: 157ms
memory: 97980kb
input:
-701873722 346965 -285561574 -913868072 -438680739 -642478208 -635510569 -418420148 -490603381 -227730031 127188597 337281552 -838723115 130135253 115810057 263863418 -763864366 -386429932 -156749189 -868827048 -882054639 -974024169 -528194168 219380847 -794616295 -999526687 -821776889 -614744 -8193...
output:
290370
result:
ok single line: '290370'
Test #24:
score: 0
Accepted
time: 32ms
memory: 90384kb
input:
61 47299 -31 -12 93 95 31 63 -4 -74 51 -39 56 -71 -88 86 19 -25 -47 -83 -42 44 -98 81 53 -83 32 -39 -47 86 10 90 -64 -86 34 -78 79 -20 -60 57 -69 40 -8 -14 -87 90 52 -25 17 84 -82 -95 -63 24 -41 9 79 -78 -86 -73 -100 6 -75 45 -93 -26 -26 -41 6 -47 74 -16 95 -83 78 -52 56 -86 -63 -58 -95 57 -69 29 87...
output:
5342957
result:
ok single line: '5342957'
Test #25:
score: 0
Accepted
time: 79ms
memory: 93976kb
input:
-416215727 179399 -334814367 -584154660 230168739 -143379055 -418882822 722760193 493677894 -70338017 -531171850 126086177 -130443997 738296126 832569559 -861113421 -255017398 412571419 -356230882 -832896968 -218524363 -593299568 -66279966 -646898403 -215724853 -176889560 -610745381 -447982517 -2837...
output:
151839
result:
ok single line: '151839'
Test #26:
score: 0
Accepted
time: 53ms
memory: 91412kb
input:
-721117726 145984 -371962404 -913036881 513265819 722849544 -726408598 -540164553 929387198 166856627 -353556945 -895550340 -18616251 788980463 -571004323 -298962520 -737714255 -455939963 -723485309 -653520030 -149166288 -58499950 -992691819 -326542244 -334932897 -740352110 -13281491 -882696356 6779...
output:
120214
result:
ok single line: '120214'
Test #27:
score: 0
Accepted
time: 209ms
memory: 100904kb
input:
-223945242 482162 662120088 333852753 -297340698 -728192196 659246833 80792878 431681037 495711925 -347540508 -167261077 -565727437 -495854718 -117805263 -493578357 -612753911 -307990010 -338456684 -421052983 -385176499 -624076176 -583009093 240794284 218303918 610040480 600505048 -440739215 -875659...
output:
403078
result:
ok single line: '403078'
Test #28:
score: 0
Accepted
time: 76ms
memory: 96352kb
input:
-369349426 212793 586831094 -464703126 -174327429 -240678370 -439913404 -528574185 -262666411 -107428626 -273070717 -594856773 793051113 -814057455 614350220 -239514960 -431300609 -423024612 -93750438 254742576 -491951660 -857092321 -247070933 -130485801 -138981611 -236485544 -66829486 -738864690 -1...
output:
175962
result:
ok single line: '175962'
Test #29:
score: 0
Accepted
time: 177ms
memory: 98664kb
input:
-46394335 393087 -487869730 -124563028 -629316691 -416737604 280006631 -820215006 -937506102 -273233821 -470603680 -795442712 652103395 -955195569 -755051399 -573298418 -135729195 -150347216 714037674 -182756776 -532374945 -158886617 248840557 127564501 -586221483 -884100791 -450513842 -248460332 -5...
output:
329983
result:
ok single line: '329983'
Test #30:
score: 0
Accepted
time: 99ms
memory: 97232kb
input:
-883947246 275597 -120319082 105714474 158690420 -931859133 -367640233 -816303755 -312483518 -512535254 -851435755 17458100 -195588602 -131213107 442571282 -770077323 348192832 -959197371 -716253216 470646603 -694446377 -839797329 -944159675 -129842005 -932898782 -854126570 -275203825 -452225244 -30...
output:
57842
result:
ok single line: '57842'
Test #31:
score: 0
Accepted
time: 191ms
memory: 98540kb
input:
-373643387 447525 -205100430 -499699438 -536945284 -214283803 -628164829 -260092833 -148253859 -195381889 -299083639 -76119465 -817282553 -351776353 -954420784 -57979679 -524329282 -598004739 -288871638 -410365045 440070189 -967360969 -894327609 -5953964 -354332610 -502018245 -861136718 -393473005 -...
output:
95895
result:
ok single line: '95895'
Test #32:
score: 0
Accepted
time: 214ms
memory: 99484kb
input:
-247252579 469452 -230059721 -741910418 -42898416 -290871756 -843294412 -104280727 -476053704 -721522759 -9669542 -297531465 -826074474 -359636276 -38360833 -9289711 -464064388 -347637943 -696369861 -570507743 -958981965 -971972205 -384965738 -750734557 -676279641 -631586977 -648337890 -913239775 -5...
output:
100401
result:
ok single line: '100401'
Test #33:
score: 0
Accepted
time: 17ms
memory: 90640kb
input:
-161858628 67919 -364563207 -911029944 -241828995 -424354712 -52798369 -652868550 -663784423 -135554003 496903000 846022878 -19281151 -677005520 -224013334 -844178035 -714044364 -952468756 -24312105 -699989438 -994478465 -621803223 -110643344 795002087 -756820062 -35473714 -972810069 -197274889 -983...
output:
15006
result:
ok single line: '15006'
Test #34:
score: 0
Accepted
time: 81ms
memory: 96268kb
input:
-564973315 196869 -229500619 -36995738 -117302309 -541284899 687156283 -330743012 -745254697 -687082549 -121732815 -785373058 14675384 -182385082 -240808225 802537647 -698273407 -566687054 -12735320 -999012235 -18985138 -191009215 -71090000 -774464270 -366683282 -211361410 -563791225 -113694741 -731...
output:
41207
result:
ok single line: '41207'
Test #35:
score: 0
Accepted
time: 65ms
memory: 96308kb
input:
850544363 178453 970388759 669001200 472677728 407679109 394721654 396014693 472229904 950064319 604016799 312470667 581487572 286403436 152802913 111043420 995998811 969016896 495647559 694891360 89729659 197002822 902139156 962489258 962824279 434882312 325042810 454834188 634581291 663589480 1118...
output:
15922825831
result:
ok single line: '15922825831'
Test #36:
score: 0
Accepted
time: 211ms
memory: 99572kb
input:
-808797225 475754 -944961703 -955925494 -891844126 -810107428 -209207011 -804831715 -225273233 -415310674 -207769417 -201192807 -281793806 -187938655 -957282393 -678367092 -152687608 -361667346 -231431337 -435975041 -19038351 -147514835 -753044362 -220360614 -58758965 -657902278 -792177434 -70108134...
output:
0
result:
ok single line: '0'
Test #37:
score: 0
Accepted
time: 94ms
memory: 96968kb
input:
-668620308 258251 -720678453 -354991238 -514306414 -895372884 -823973496 -263208443 -588208739 -909578569 -995224131 -684956666 -296546675 -619763188 -566532532 -714532778 -338942961 -435908159 -717932148 -853749033 -932851448 -437899207 -562603773 -84286499 -464771335 -253060755 -568751105 -7135672...
output:
0
result:
ok single line: '0'
Test #38:
score: 0
Accepted
time: 63ms
memory: 96520kb
input:
-882901989 218008 -711051097 -904334412 -682837210 -973504743 -832613745 -596320271 -594212900 -491854787 -65445225 -382039213 -984243485 -550768045 -172173401 -409098384 -417680721 -707158466 -889989585 -752035626 -396290142 -75777798 -922482023 -306746332 -220777264 -356885772 -3394474 -642195643 ...
output:
0
result:
ok single line: '0'
Test #39:
score: 0
Accepted
time: 166ms
memory: 99172kb
input:
-206784327 404816 -422308839 -366257066 -860714032 -711232445 -552272480 -57142591 -951032687 -842869902 -379943923 -547462923 -295137759 -948929499 -663766846 -889674832 -111241287 -395951579 -907599467 -686193733 -805456083 -271543481 -114499039 -432749174 -80745028 -252291581 -630651318 -73657941...
output:
0
result:
ok single line: '0'
Test #40:
score: 0
Accepted
time: 54ms
memory: 92068kb
input:
-883599705 179922 -172049793 -369565590 -561315172 -756077649 -119964781 -310167324 -190629634 -809389234 -890857758 -317631529 -182764583 -64731724 -694482019 -77996022 -736115793 -361551054 -82107213 -762840850 -788390756 -626344444 -377490475 -205699669 -13898677 -897022629 -904797607 -784295088 ...
output:
0
result:
ok single line: '0'
Test #41:
score: 0
Accepted
time: 183ms
memory: 104088kb
input:
592590915 443277 182534460 887778720 948015379 546264278 2563281 353309160 455578797 2443909 228227545 641587315 751900707 901747001 604885340 250794126 408255490 926662713 578319243 908230004 726145132 449638420 33764928 634809575 268834718 346691204 323327186 892856146 456979666 234782594 40825671...
output:
98247471003
result:
ok single line: '98247471003'
Test #42:
score: 0
Accepted
time: 161ms
memory: 102748kb
input:
339702931 386724 31025318 226412080 408334541 594773309 68233888 930431257 914378295 689726391 11623292 524626273 960339000 169079751 15174432 432078537 611555700 530518636 528935227 385751066 145819526 656337701 732999456 976117429 433019906 582411261 409052120 645904808 467753820 861210454 8792459...
output:
74777919450
result:
ok single line: '74777919450'
Test #43:
score: 0
Accepted
time: 140ms
memory: 98840kb
input:
329016661 285231 463122455 643900940 534305516 865949611 -42558899 307604894 -145560211 994028603 -150177430 955553598 829215478 965415496 315493096 781681504 903857631 336442537 394928162 430425632 -377723349 -91912889 54833987 -327810334 960222443 702142311 764873594 63234525 -571940646 607192502 ...
output:
22231231788
result:
ok single line: '22231231788'
Test #44:
score: 0
Accepted
time: 250ms
memory: 102504kb
input:
795353801 475091 343166151 722868549 637087852 225984487 327487220 551949854 -835953292 738317487 617718726 466672873 345099510 652936728 598206903 634700403 261579015 -964052855 -408861666 590143835 667554970 170913369 -935853581 332346497 772409760 830283601 934922839 435824401 674220988 -95503454...
output:
61208386687
result:
ok single line: '61208386687'
Test #45:
score: 0
Accepted
time: 124ms
memory: 98952kb
input:
40829836 247763 777348594 -584307244 -220604669 995531628 453490723 838403755 838052880 439748834 619149806 825436712 911198626 883377757 465123850 429907357 -488741298 857357565 582343358 601715468 -16069147 190272665 -65333100 656187584 -575948925 976348930 828595174 317005262 184526623 479654310 ...
output:
16632258851
result:
ok single line: '16632258851'
Test #46:
score: 0
Accepted
time: 235ms
memory: 101528kb
input:
28288719 433398 -988652328 578626571 337177965 157330744 553075785 -709557327 266152992 587955798 364820463 -817107678 -725256822 760876359 207695423 -720483772 -568219380 764620805 -488402980 183630074 560156072 -20558023 -635376973 772215463 962428515 922572060 -561051919 52060227 662839560 -98664...
output:
50980345861
result:
ok single line: '50980345861'
Test #47:
score: 0
Accepted
time: 16ms
memory: 89764kb
input:
-1 6 1 1 -2 1 3 -5
output:
9
result:
ok single line: '9'
Test #48:
score: 0
Accepted
time: 293ms
memory: 104800kb
input:
263358196 495454 568747628 80412650 274931755 979439962 -72112540 434517307 -638881743 340798561 909992257 142543408 -843296047 543809661 127746827 -601829599 728821525 324955508 -26974011 538895163 443038032 477129070 741063488 698794773 380610912 444748663 714485275 981461493 -760070864 299732914 ...
output:
66945970960
result:
ok single line: '66945970960'
Test #49:
score: 0
Accepted
time: 58ms
memory: 93372kb
input:
508136813 124725 -288335887 626042949 -562241123 251615643 178784504 754971821 -410244798 -606255207 394262929 494815022 985498349 536749653 -295129172 963444907 942856959 318175147 454085510 -703177513 -8908658 -549524471 557145192 -750721560 -309742642 820729053 -365431072 -199932954 462765776 135...
output:
57809184
result:
ok single line: '57809184'
Test #50:
score: 0
Accepted
time: 153ms
memory: 97904kb
input:
533073325 325527 923638821 -482795612 592628057 92735789 489811530 -81163963 264832491 616205332 222983921 904440504 -710509534 -165485351 446943407 -545650591 -674721379 -664559070 156986948 -246305165 -786691989 -227841960 -189544380 -585378166 356567039 -914059501 655570823 938604216 689854033 15...
output:
88317618
result:
ok single line: '88317618'
Test #51:
score: 0
Accepted
time: 31ms
memory: 92528kb
input:
679934043 66002 651607642 -535749431 -444293069 -236060484 421706853 457310911 -616805891 913631851 -924179303 -998766679 -991894899 530917384 -149721113 757411925 81541448 35158993 -55111419 -507496168 579666107 300707803 -851383747 -498182410 638645282 -384893800 -802412216 128193508 -442752678 79...
output:
15040186
result:
ok single line: '15040186'
Test #52:
score: 0
Accepted
time: 208ms
memory: 98560kb
input:
856064378 387111 939528015 551878159 -897601600 -830243515 -892194516 43229253 -92787875 77827259 -749176869 -878205005 -448774650 699226496 -413286191 -918352257 -30571557 434560182 -650568259 -584683380 925908687 711756667 758642498 -561079134 -47493322 -362893014 -560020866 434880637 201184258 72...
output:
172266601
result:
ok single line: '172266601'
Test #53:
score: 0
Accepted
time: 193ms
memory: 98920kb
input:
633837198 413495 -943062263 449347729 -641334927 533609256 18761518 924821832 -321610900 -288022450 728701124 -395591331 138061084 -184717795 -727674029 271968226 444471838 -668413512 -186609209 -925225239 747136677 -790312979 -678161187 495397896 -886180689 -22896648 -692747226 65114040 318596393 2...
output:
130802779
result:
ok single line: '130802779'
Test #54:
score: 0
Accepted
time: 90ms
memory: 92100kb
input:
694899551 187347 -551123981 -400958318 140808187 724800642 -309421417 -754681222 -255043945 253763197 399584777 970054719 643396685 -22627939 -697887441 -444085945 167154474 434063922 -514818397 976928333 -154868218 -79303765 247293919 446402862 956444682 -880487558 256788120 -458778683 841156668 -3...
output:
23594409
result:
ok single line: '23594409'
Test #55:
score: 0
Accepted
time: 196ms
memory: 98172kb
input:
439420127 357216 236401425 231759916 -55710207 285716914 336511913 354357412 -467285706 -799031284 146526619 -486768948 -178078554 -694023547 -273934331 -4398807 -495884578 186713893 -775460955 -456959460 -286308279 -617704557 175570409 166351146 -122671578 826525776 -861170894 -249392888 -901858493...
output:
308407540
result:
ok single line: '308407540'
Test #56:
score: 0
Accepted
time: 19ms
memory: 90128kb
input:
374782371 19160 795556936 46404210 -811223299 -288505277 393622185 -27569771 336090900 -863188127 816660659 -537764042 -246368093 -396689251 921321219 -939595242 -467217302 684468779 -849880596 228771169 219198853 344907159 188275373 383133972 185652317 -210890609 858341122 236242066 475048346 -8144...
output:
1004656
result:
ok single line: '1004656'
Test #57:
score: 0
Accepted
time: 200ms
memory: 99796kb
input:
275538816 438028 649256530 -601150811 -615000255 -417908689 -100073745 -510965291 -471237062 702314027 890807849 588968671 585621110 51794010 -798235534 664777187 -476707065 94761521 997928950 -44262562 938350979 765065270 93202011 796913861 -457667055 829534252 -354073069 -12878004 -910164267 -4740...
output:
92299369
result:
ok single line: '92299369'
Test #58:
score: 0
Accepted
time: 8ms
memory: 89752kb
input:
5 46 17 32 6 30 -65 -17 -100 66 -17 -80 93 -33 43 58 -40 -18 -84 88 -23 32 70 -17 -16 -29 11 -62 -73 46 25 80 71 -29 95 -13 12 -100 95 85 58 -37 -6 20 16 -7 28 -88
output:
187
result:
ok single line: '187'
Test #59:
score: 0
Accepted
time: 206ms
memory: 98764kb
input:
951964149 405592 -695846858 -130440154 -492424552 21343243 93646122 690058122 852583338 417162289 -290937436 -70173571 699853103 -766848641 881461887 -317748553 -726587200 578588884 659741349 938276333 -426140019 177222693 103585222 696876047 -266091913 838645426 630938734 756665861 -803182814 60524...
output:
151188294
result:
ok single line: '151188294'
Test #60:
score: 0
Accepted
time: 90ms
memory: 97060kb
input:
401282890 265928 -861430326 -568983959 -37092256 -124430673 599279270 -848590409 759896998 -674251677 647686817 -968021476 -25790090 -44088648 925244703 -503701106 -637114059 -60815607 595311372 -632130479 -258341495 -826485467 -297834259 537532873 -223431779 -132815996 -297156984 696914500 87996238...
output:
223895
result:
ok single line: '223895'
Test #61:
score: 0
Accepted
time: 114ms
memory: 97244kb
input:
399666669 283515 -136209765 -30089316 -331549658 426776353 375328210 137633674 747510575 218800792 -804800440 -311430443 -761926920 -432523140 -765553134 -507481318 -280951291 -703435990 -458824552 -609792677 -110247392 -300079504 -180538835 -587405531 -610972253 -906273038 -697330816 -982477496 743...
output:
236651
result:
ok single line: '236651'
Test #62:
score: 0
Accepted
time: 96ms
memory: 94784kb
input:
418109230 242976 -842567253 -578281880 913725575 929557274 -668528192 954534446 300024158 -491872483 -981215830 -612928660 -833349177 -534313892 -371926120 -907672415 -707447189 -289754033 -865059478 564516240 -936516177 -857516356 656915145 -803025256 -143246066 396990325 133534550 -931295455 -1758...
output:
201278
result:
ok single line: '201278'
Test #63:
score: 0
Accepted
time: 69ms
memory: 96036kb
input:
527578604 185836 -293217844 357910328 -927027580 -667276641 -201994507 269874972 -151263701 -625266653 -146903348 974476227 -579196350 -777415283 549031769 -741873759 122865207 -941542022 514241311 390180640 -96339581 -21705952 -575553196 -797109595 -551063439 -616062516 -619204805 -206774718 -97628...
output:
155752
result:
ok single line: '155752'
Test #64:
score: 0
Accepted
time: 229ms
memory: 100896kb
input:
619951619 494522 589442376 -791107350 -535012159 -27513714 -645835714 -961786141 -441215303 -745468746 904709486 -915708561 -528370439 -271340905 -532886014 -365825831 876836826 186265547 -283941082 -458424058 -795945580 -268234493 971954980 -191837431 -565692004 -19326205 -387344205 -323775876 -557...
output:
411135
result:
ok single line: '411135'
Test #65:
score: 0
Accepted
time: 135ms
memory: 97784kb
input:
636423476 330511 -26816286 -247916662 -322387172 -96856536 -544668236 -877816734 -204751327 -785332158 -418304825 -116924360 -14164283 -429169057 -615172562 -128285249 -80273372 -197717604 -688192131 -239518930 -743686426 -298433066 -746102007 -355711685 -225587867 -803271095 -621557785 -924104907 -...
output:
8
result:
ok single line: '8'
Test #66:
score: 0
Accepted
time: 198ms
memory: 100436kb
input:
97946210 457678 -669932605 -708731990 -100745612 -88389790 -413880699 -337967474 -816457121 -567801512 -89470763 -12034061 -96835860 -514107672 -415714308 -354532522 -251493955 -305495798 -521045968 -951179644 -706687778 -733470944 -458332338 -80519112 -29086760 -220497462 -627926104 -907910495 -243...
output:
4
result:
ok single line: '4'
Test #67:
score: 0
Accepted
time: 127ms
memory: 97368kb
input:
886580291 299645 -234135288 -662457694 -447650008 -915689006 -820131075 -896590227 -420063578 -442060209 -984489625 -255934660 -557984711 -280804165 -537156940 -910350445 -926596125 -82146927 -94190886 -565844062 -643077032 -460344420 -356981145 -770516119 -828743967 -486272499 -18636997 -943713511 ...
output:
8
result:
ok single line: '8'
Test #68:
score: 0
Accepted
time: 7ms
memory: 89900kb
input:
-10 4 -5 0 -4 -6
output:
1
result:
ok single line: '1'
Test #69:
score: 0
Accepted
time: 2ms
memory: 89820kb
input:
93 7 27 24 -54 28 91 -99 -27
output:
22
result:
ok single line: '22'
Test #70:
score: 0
Accepted
time: 12ms
memory: 89844kb
input:
-7 4 -6 -8 10 0
output:
3
result:
ok single line: '3'
Test #71:
score: 0
Accepted
time: 3ms
memory: 89900kb
input:
-1 48 -8 6 3 -5 8 8 -5 -1 4 10 -5 7 1 3 -9 -10 -9 7 -7 1 -10 -7 9 10 4 9 0 -9 3 -5 5 8 9 -9 0 9 -10 5 -1 4 -8 1 -2 3 -8 -6 -3 -10
output:
195
result:
ok single line: '195'
Test #72:
score: -100
Wrong Answer
time: 15ms
memory: 89956kb
input:
-9 1 6
output:
1
result:
wrong answer 1st lines differ - expected: '0', found: '1'