QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#24721 | #1247. Pop music | Wu_Ren | AC ✓ | 84ms | 24436kb | C++17 | 994b | 2022-04-02 16:45:33 | 2022-04-30 06:31:38 |
Judging History
answer
#include <bits/stdc++.h>
typedef long long ll;
const int B=60;
const ll inf=1e18;
using namespace std;
int n;
ll m,a[210],f[60][210][210],g[60][210];
bool vis[60][210];
ll dfs(int d,int p){//p-n顶上界
if(p>n) return 0;
if(d<0) return p==n?0:-inf;
if(vis[d][p]) return g[d][p];
vis[d][p]=1,g[d][p]=dfs(d-1,p)+(((m>>d)&1)?max(a[n]-a[p-1],0ll):0);
if((m>>d)&1){
for(int i=p;i<=n;i++) g[d][p]=max(dfs(d-1,i+1)+f[d][p][i]+a[n]-a[i],g[d][p]);
}
return g[d][p];
}
int main(){
cin>>n>>m;
for(int i=1;i<=n;i++) cin>>a[i],a[i]+=a[i-1];
for(int k=0;k<B;k++) for(int i=1;i<=n;i++) for(int j=1;j<=n;j++) f[k][i][j]=-inf;
for(int i=1;i<=n;i++) f[0][i][i]=0;
for(int k=1;k<B;k++) for(int l=1;l<=n;l++) for(int r=l;r<=n;r++){
f[k][l][r]=f[k-1][l][r]+max(a[r]-a[l-1],0ll);
for(int j=l;j<=r;j++){
f[k][l][r]=max(f[k][l][r],f[k-1][l][j]+f[k-1][j+1][r]+a[r]-a[j]);
}
// cerr<<"f["<<k<<"]["<<l<<"]["<<r<<"]="<<f[k][l][r]<<"\n";
}
cout<<dfs(B-1,1)<<"\n";
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 24288kb
input:
3 5 2 -1 3
output:
9
result:
ok answer is '9'
Test #2:
score: 0
Accepted
time: 2ms
memory: 22196kb
input:
3 2 1 1 -1
output:
0
result:
ok answer is '0'
Test #3:
score: 0
Accepted
time: 2ms
memory: 24128kb
input:
6 11 -75 19 1 72 106 170
output:
1012
result:
ok answer is '1012'
Test #4:
score: 0
Accepted
time: 2ms
memory: 22340kb
input:
9 8 150 -23 -27 144 12 -105 5 91 127
output:
450
result:
ok answer is '450'
Test #5:
score: 0
Accepted
time: 2ms
memory: 22360kb
input:
12 19 -68 -109 -256 -114 -96 62 -270 -147 137 -265 -146 134
output:
-656
result:
ok answer is '-656'
Test #6:
score: 0
Accepted
time: 4ms
memory: 22324kb
input:
15 15 -288 -105 176 85 198 -292 -13 38 232 83 -256 107 -137 17 224
output:
823
result:
ok answer is '823'
Test #7:
score: 0
Accepted
time: 1ms
memory: 22456kb
input:
18 19 143 85 -43 77 -3 174 31 -201 -162 138 -18 249 -164 242 -187 89 -29 223
output:
2448
result:
ok answer is '2448'
Test #8:
score: 0
Accepted
time: 1ms
memory: 22380kb
input:
21 20 -10 -26 -190 4 -209 -22 -7 -166 -122 -21 29 -26 3 75 -73 -18 -134 99 5 -30 -131
output:
-1495
result:
ok answer is '-1495'
Test #9:
score: 0
Accepted
time: 4ms
memory: 22376kb
input:
21 20 149 83 207 12 216 -25 114 11 -156 -23 -107 188 206 9 -32 -31 178 -11 -7 172 74
output:
1914
result:
ok answer is '1914'
Test #10:
score: 0
Accepted
time: 2ms
memory: 22368kb
input:
21 20 222 72 -93 75 2 28 62 37 -17 213 -62 -34 -178 116 166 11 62 -177 121 -140 34
output:
737
result:
ok answer is '737'
Test #11:
score: 0
Accepted
time: 3ms
memory: 22164kb
input:
1 0 0
output:
0
result:
ok answer is '0'
Test #12:
score: 0
Accepted
time: 1ms
memory: 22120kb
input:
1 5 -2
output:
0
result:
ok answer is '0'
Test #13:
score: 0
Accepted
time: 1ms
memory: 22296kb
input:
1 0 3
output:
0
result:
ok answer is '0'
Test #14:
score: 0
Accepted
time: 78ms
memory: 24360kb
input:
200 300 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4194304...
output:
784473784945014
result:
ok answer is '784473784945014'
Test #15:
score: 0
Accepted
time: 69ms
memory: 24360kb
input:
200 300 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4194304...
output:
784473784945690
result:
ok answer is '784473784945690'
Test #16:
score: 0
Accepted
time: 40ms
memory: 23976kb
input:
165 169 34767544146 -18511114946 982159751 3745408955 -3462120367 -2179679203 1549556848 -73795479 758831190 10000000000000 511272596 222978506 45107851 330737901 -131578264 -80126122 190019688 -279553821 -64535576 10000000000000 70002823 -9300954 132325335 -80254710 -111154174 -69394457 -41965820 1...
output:
680018741805734
result:
ok answer is '680018741805734'
Test #17:
score: 0
Accepted
time: 2ms
memory: 22776kb
input:
54 198 -6654100547 -807587732 -1070011092 3468518399 -3255608581 231617974 -1190337520 1497003435 -302545370 -10000000000000 -54995360 151132527 76491058 -482439286 -49153750 101180040 -17020948 -307960203 -73539024 -10000000000000 -124629883 -113650698 103792946 -80293625 65638039 47693918 64025828...
output:
-59990526250942
result:
ok answer is '-59990526250942'
Test #18:
score: 0
Accepted
time: 26ms
memory: 23652kb
input:
142 259 -7531789782947 163999233264 -2463431905418 -6950000083465 4692632609641 2047731861450 49433611547 3212689866709 -2069848504408 6712146659408 -6584583952176 5891052351837 2012678891337 1716490958276 -3185221667116 -6836380797897 -3277313758689 -1325938799874 2773173795888 -9367739126980 36064...
output:
1160474293862657
result:
ok answer is '1160474293862657'
Test #19:
score: 0
Accepted
time: 69ms
memory: 24164kb
input:
200 256 -40945636152 -21568908371 -10243133979 1441004942 -2269848005 -1809056423 109821738 1234044554 -953060241 10000000000000 -582059610 -576024027 -84999580 -400491749 -283328164 -261636886 113572041 22660351 -224785879 10000000000000 142067179 64623340 122933705 30535251 -133064542 -113946291 -...
output:
1129966019097425
result:
ok answer is '1129966019097425'
Test #20:
score: 0
Accepted
time: 76ms
memory: 24376kb
input:
200 100000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4194...
output:
2181428353208979
result:
ok answer is '2181428353208979'
Test #21:
score: 0
Accepted
time: 70ms
memory: 24312kb
input:
200 100000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4194...
output:
2181428353210141
result:
ok answer is '2181428353210141'
Test #22:
score: 0
Accepted
time: 52ms
memory: 24084kb
input:
175 86224 13832691774 -20454632605 655850259 46065448 -3822566112 -576794218 1065610775 -325890948 930789680 10000000000000 810794801 175820448 557987124 393417673 135273691 -295252427 1861523 210718121 -187621683 10000000000000 115456128 100428176 -171454966 163214678 117335959 -11452666 -76720370 ...
output:
2530239206288733
result:
ok answer is '2530239206288733'
Test #23:
score: 0
Accepted
time: 1ms
memory: 22712kb
input:
44 6501 91887463846 -20270920477 -9647758465 -4210378545 3659336834 946891609 -294591221 617347902 119518844 -10000000000000 22522494 -101926739 196388952 -83436884 324483088 47474626 -219856508 -227859966 -135048150 -10000000000000 153035558 22307208 -93849157 -69516983 51468421 -29308648 130727887...
output:
-39261923858695
result:
ok answer is '-39261923858695'
Test #24:
score: 0
Accepted
time: 0ms
memory: 24308kb
input:
27 52737 2342104670273 -2712850421984 -6404177133772 -4044151585743 -7404705610275 -7320294702324 -440513408921 -9967834558700 8273480441953 7026581526538 -8367322582242 -569950320848 8771544901722 -4150456413645 -1568798468850 -2512334906547 -4824391334554 -7343340119720 579339400160 4332434021530 ...
output:
516151774147985
result:
ok answer is '516151774147985'
Test #25:
score: 0
Accepted
time: 74ms
memory: 24436kb
input:
200 7964 -58281656753 -16915497200 -2829005725 3113909956 1587847897 1458183482 -1391112364 1364990512 835943586 10000000000000 -648269546 371560674 -581717778 148789507 57771507 270624544 144842665 -112719242 -30265983 10000000000000 -44244002 129449860 -151397216 142789062 113630763 114267292 -135...
output:
2250084335333304
result:
ok answer is '2250084335333304'
Test #26:
score: 0
Accepted
time: 1ms
memory: 22600kb
input:
50 1073741823 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4...
output:
4081387155157750
result:
ok answer is '4081387155157750'
Test #27:
score: 0
Accepted
time: 4ms
memory: 22816kb
input:
50 1073741823 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 4...
output:
4081387155157838
result:
ok answer is '4081387155157838'
Test #28:
score: 0
Accepted
time: 5ms
memory: 22272kb
input:
6 1073741823 -56859075925 -24789166745 10208114866 4703064511 1898075281 2268131078
output:
530723150677
result:
ok answer is '530723150677'
Test #29:
score: 0
Accepted
time: 1ms
memory: 22252kb
input:
10 1073741823 82929601376 16138320003 6821231016 -743759343 -561878009 1902674359 1795540750 -181549870 912055410 -10000000000000
output:
-6910490642413
result:
ok answer is '-6910490642413'
Test #30:
score: 0
Accepted
time: 2ms
memory: 24216kb
input:
22 1073741823 -6352602339343 -7648996794282 9950312287130 8417806957518 1396004613613 -7438707302534 -554679736332 539994436829 7486994067744 6623491663876 6070571850083 8150300164393 3545624706489 -6193457538250 7348884340539 -1691012589404 2841072392579 -9370730300399 -7364556458932 8064240787984 ...
output:
2089849817920614
result:
ok answer is '2089849817920614'
Test #31:
score: 0
Accepted
time: 4ms
memory: 22720kb
input:
50 1073741823 -91439510799 17152138138 3834392475 -5442388941 -3476463130 1298764358 -873367736 731264999 154764670 10000000000000 191003591 -400197394 -10392457 305004723 -82896425 324123118 139361598 -275725529 41435410 10000000000000 64331282 -141803682 -21908536 -67268006 38440761 -109636937 -23...
output:
1460681269110834
result:
ok answer is '1460681269110834'
Test #32:
score: 0
Accepted
time: 2ms
memory: 22780kb
input:
50 400000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 41...
output:
3866844949579282
result:
ok answer is '3866844949579282'
Test #33:
score: 0
Accepted
time: 9ms
memory: 24248kb
input:
50 400000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608 41...
output:
3866844949579335
result:
ok answer is '3866844949579335'
Test #34:
score: 0
Accepted
time: 4ms
memory: 24080kb
input:
47 354477549 -64454242656 -15944680649 7425234705 4438731757 696230532 2572155501 -365362022 -398085804 396452882 10000000000000 465973888 -72060354 -304805562 -354318869 -59487485 -283188616 303170473 -93575160 -67613252 10000000000000 -82271809 -108575377 166498125 -138941501 90040165 -128603978 1...
output:
1090426343671575
result:
ok answer is '1090426343671575'
Test #35:
score: 0
Accepted
time: 2ms
memory: 24164kb
input:
31 140013333 -22312333729 20318818754 6452457540 -1367403390 3342032537 300300566 1043218120 1009892540 -865197943 -10000000000000 -303726863 89584747 -221369357 -189192250 239463966 -62892059 184046036 -155442556 -72222138 -10000000000000 -130962243 -164390850 -11064060 -120726025 137070249 -138932...
output:
-29214062903563
result:
ok answer is '-29214062903563'
Test #36:
score: 0
Accepted
time: 4ms
memory: 22528kb
input:
34 390798914 -5040015622721 1086402377570 5978886958270 -4903595416180 7299451805529 8297888746323 4512305032434 6760898301526 -2847765478971 4347114298289 -2824857341704 7015290122903 109659275025 4619514320856 -4744006585104 -1252738831675 8791893174016 893994599868 8619476734064 7997288226052 -19...
output:
3135317930185600
result:
ok answer is '3135317930185600'
Test #37:
score: 0
Accepted
time: 2ms
memory: 22808kb
input:
50 214285373 -9879018947 9291026396 -9550724277 5742491150 -2814493703 -2375485636 -862877371 -111430720 701947164 10000000000000 -780489481 -135337703 -428490092 -329074690 -251128345 218295557 -48278708 8941008 134191555 10000000000000 37190466 165903179 123378389 74958685 -84897484 -98633791 -131...
output:
1320404472843843
result:
ok answer is '1320404472843843'
Test #38:
score: 0
Accepted
time: 10ms
memory: 23348kb
input:
100 10000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608...
output:
4503599627362277
result:
ok answer is '4503599627362277'
Test #39:
score: 0
Accepted
time: 11ms
memory: 23076kb
input:
100 10000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 8388608...
output:
4503599627363831
result:
ok answer is '4503599627363831'
Test #40:
score: 0
Accepted
time: 9ms
memory: 23032kb
input:
84 8889809072 63345987844 24812872225 6807762240 442577686 2156964873 -278551667 219534866 4773827 420483649 10000000000000 633618184 -114553713 221077507 329525185 437505283 -18724095 -473009 -77837372 73790288 10000000000000 -68848020 -203527553 68894162 34586220 70654020 31901245 67617554 6587284...
output:
2573212923001740
result:
ok answer is '2573212923001740'
Test #41:
score: 0
Accepted
time: 11ms
memory: 23112kb
input:
91 5800614600 -96532988756 -23171442539 -2965590990 2605359685 -165095723 2357488440 -2023774359 1394272083 777895212 -10000000000000 416132436 344436115 280301478 181918547 277512483 -35791380 99492548 -5635185 -202294497 -10000000000000 -16974727 141183983 96923373 -160928249 157113777 69717179 -7...
output:
-89802204022302
result:
ok answer is '-89802204022302'
Test #42:
score: 0
Accepted
time: 4ms
memory: 22624kb
input:
39 5873255212 5604705778576 -4784270682521 1861331018822 -3510247192485 2754478723136 -5293166838865 6238715833289 -9846774817370 -2099946061971 -5145469778372 -4886221554684 -1518692776612 -4713850740424 4756930728595 -3531079536250 -6213522456178 8913966687236 5571908383879 6562366075527 -67046862...
output:
2960797437623706
result:
ok answer is '2960797437623706'
Test #43:
score: 0
Accepted
time: 13ms
memory: 23272kb
input:
100 4139835553 -75365686702 8396663953 -5436181307 1781069596 -3813117956 -381835676 -242372173 -153928046 54567923 10000000000000 770548951 4882821 -177866749 -400911112 -306169212 -67562186 -69267268 58968865 -155942171 10000000000000 -146736328 51390082 94072386 132609637 -43288768 -86850821 1336...
output:
3040341200084131
result:
ok answer is '3040341200084131'
Test #44:
score: 0
Accepted
time: 31ms
memory: 23856kb
input:
150 1000000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 83886...
output:
5453577673768924
result:
ok answer is '5453577673768924'
Test #45:
score: 0
Accepted
time: 30ms
memory: 23688kb
input:
150 1000000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 83886...
output:
5453577673772661
result:
ok answer is '5453577673772661'
Test #46:
score: 0
Accepted
time: 0ms
memory: 22564kb
input:
40 681076501431 48153125867 -7335063357 -8434078330 -2767534672 3481261326 -644779893 833255534 1047288736 -380754721 10000000000000 -105039584 -62882208 -273698212 485411421 -95404425 -131678841 -148488045 151543632 -258493601 10000000000000 104154797 -59773327 91888605 66958271 -72807600 2334733 2...
output:
1532036851899144
result:
ok answer is '1532036851899144'
Test #47:
score: 0
Accepted
time: 3ms
memory: 22184kb
input:
2 510152469438 80531367116 16268954911
output:
3678412237026
result:
ok answer is '3678412237026'
Test #48:
score: 0
Accepted
time: 3ms
memory: 24264kb
input:
5 584091436939 -3900595113663 -595596271936 8643130394820 9745764678223 7981254860088
output:
1009451356047130
result:
ok answer is '1009451356047130'
Test #49:
score: 0
Accepted
time: 31ms
memory: 23804kb
input:
150 654886348201 72488627728 -5102522000 9386568598 2856826120 351732089 2253630179 1033128216 1516751745 141138864 10000000000000 -237467673 179043984 505597805 70916813 160843771 -175328297 -242625743 -36240279 -101028757 10000000000000 206965877 -79258500 106955947 4375795 -131845997 25377144 -36...
output:
5713471871847772
result:
ok answer is '5713471871847772'
Test #50:
score: 0
Accepted
time: 76ms
memory: 24272kb
input:
200 1000000000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 83...
output:
6860952557322193
result:
ok answer is '6860952557322193'
Test #51:
score: 0
Accepted
time: 77ms
memory: 24152kb
input:
200 1000000000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 83...
output:
6860952557329127
result:
ok answer is '6860952557329127'
Test #52:
score: 0
Accepted
time: 2ms
memory: 22468kb
input:
21 620711915665046 -26601106296 19727335759 -6808390149 -4970108521 3850094006 -1940551904 341979697 -895741719 1207540527 10000000000000 482389904 -422672985 518731454 318364821 390290472 -93287822 -287252653 -105314925 -230665000 10000000000000 11809734
output:
971257408524949
result:
ok answer is '971257408524949'
Test #53:
score: 0
Accepted
time: 3ms
memory: 22200kb
input:
10 986144518427715 30148339416 -12632297119 -9392437660 1660970460 2257715985 -832826607 496091181 1172064636 361843185 -10000000000000
output:
-8300896615651
result:
ok answer is '-8300896615651'
Test #54:
score: 0
Accepted
time: 65ms
memory: 24152kb
input:
185 446978844881202 -3389627476238 3776801693626 4136697657213 -5953936574031 -8917125574774 7857545887636 6815890339403 -2844519204623 414366815111 3407939565094 6763238591029 -472402962950 -8545910702085 -578586782611 -798988233372 -2335034472847 2147159391158 -6945566354307 -4911570388458 -291113...
output:
20582328945776849
result:
ok answer is '20582328945776849'
Test #55:
score: 0
Accepted
time: 72ms
memory: 24300kb
input:
200 328565138532732 46405733660 -7212735636 10480475271 -3971256577 -1327368123 2210896191 1884609391 -452195144 -397480006 10000000000000 320705491 -59287257 61040886 -90202089 107498620 384253905 7026794 -130790470 -276817313 10000000000000 139860475 -71249327 -45356079 97387684 -19997146 52593324...
output:
9412920185267505
result:
ok answer is '9412920185267505'
Test #56:
score: 0
Accepted
time: 84ms
memory: 24152kb
input:
200 288230376151711743 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 ...
output:
8022036836253639
result:
ok answer is '8022036836253639'
Test #57:
score: 0
Accepted
time: 74ms
memory: 24220kb
input:
200 288230376151711743 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216 ...
output:
8022036836262173
result:
ok answer is '8022036836262173'
Test #58:
score: 0
Accepted
time: 2ms
memory: 22296kb
input:
5 288230376151711743 33854595318 18464007651 -999961493 -5091695841 -3256136523
output:
2955116949155
result:
ok answer is '2955116949155'
Test #59:
score: 0
Accepted
time: 54ms
memory: 24028kb
input:
173 288230376151711743 47183969266 2845980304 7873866018 3992296344 -179941327 2189757896 -612818633 -1394902769 858273487 -10000000000000 -349471357 -673323292 463483868 -91891536 -202009899 170208918 302883011 -237607560 -225367050 -10000000000000 -36323173 -127611065 17107914 -36588031 -144783411...
output:
-167345763794612
result:
ok answer is '-167345763794612'
Test #60:
score: 0
Accepted
time: 2ms
memory: 22392kb
input:
20 288230376151711743 -5015791352355 595643550541 -8842312707619 -4591589554040 4632755062893 7051708514282 -9071740974435 7897651919192 6535561545906 188933366276 4479622975319 -5208389702873 7544985137408 409208141285 8142896899785 498072614489 7969718140572 -1042699117305 6301125441772 5652576814...
output:
3818420451752068
result:
ok answer is '3818420451752068'
Test #61:
score: 0
Accepted
time: 71ms
memory: 24384kb
input:
200 288230376151711743 38587104766 7030309942 3317544567 -3787788227 1009337882 2139452916 1320852130 -1395697519 -580826080 10000000000000 443336281 -511740359 -344814756 -163909782 371159482 -97676376 -324122673 111415140 103158529 10000000000000 117243866 -169488768 37238109 -76548822 -27185465 8...
output:
11413118331059152
result:
ok answer is '11413118331059152'
Test #62:
score: 0
Accepted
time: 75ms
memory: 24292kb
input:
200 1000000000000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216...
output:
8263929394364360
result:
ok answer is '8263929394364360'
Test #63:
score: 0
Accepted
time: 78ms
memory: 24224kb
input:
200 1000000000000000000 70368744177664 35184372088832 17592186044416 8796093022208 4398046511104 2199023255552 1099511627776 549755813888 274877906944 137438953472 68719476736 34359738368 17179869184 8589934592 4294967296 2147483648 1073741824 536870912 268435456 134217728 67108864 33554432 16777216...
output:
8263929394372893
result:
ok answer is '8263929394372893'
Test #64:
score: 0
Accepted
time: 4ms
memory: 22856kb
input:
73 804297898625893668 708032328623 106951898029 67832037165 56224954643 -3695986209 21405014873 -5218039186 9302049909 -3951314258 100000000000000 -408292925 -5295444372 -1999762952 63608028 -371237401 -3613362415 -269902571 450827593 973298624 100000000000000 -342277405 855491449 1480167793 -221738...
output:
40756562684709688
result:
ok answer is '40756562684709688'
Test #65:
score: 0
Accepted
time: 12ms
memory: 23272kb
input:
105 960864391274839653 -678081120403 -207161609386 -48104948260 56169613960 -34586483801 2746016849 1730120151 4099440371 -9517784324 -100000000000000 6455689625 1521840677 -2907656256 -448082488 -2680464559 -3304880200 2051654846 287248656 1527902107 -100000000000000 -1275325153 1425496666 65858829...
output:
-996038610454635
result:
ok answer is '-996038610454635'
Test #66:
score: 0
Accepted
time: 11ms
memory: 23276kb
input:
113 143599367285812575 71718185134816 -6123635336453 87098341313849 -41488720658638 95941248681850 70172359877004 56651132376779 17434584165973 -77890004642123 39440650169787 97986647274093 -38693350358926 -54436373355551 9208798684722 14512040723059 -28209974992126 53450906913217 86672963658662 -25...
output:
177994466215403472
result:
ok answer is '177994466215403472'
Test #67:
score: 0
Accepted
time: 77ms
memory: 24368kb
input:
200 911879988136947502 -3321742136 44049795124 -53059499576 -4332493213 -20764820490 -22989353343 19305788870 -11496562938 -7358329250 100000000000000 7774790339 2605196201 -3547912983 3771750585 4276563591 2965585893 1066423102 -2141773548 2083715455 100000000000000 688893656 454976709 1373163579 4...
output:
116205555917329405
result:
ok answer is '116205555917329405'
Test #68:
score: 0
Accepted
time: 73ms
memory: 24232kb
input:
200 1000000000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 100000000000000 1000...
output:
1152500000000000000
result:
ok answer is '1152500000000000000'
Test #69:
score: 0
Accepted
time: 75ms
memory: 24344kb
input:
200 1000000000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100000000000000 -100...
output:
-33800000000000000
result:
ok answer is '-33800000000000000'