QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#19650 | #1170. Hotspot-2 | wlzhouzhuan | WA | 140ms | 38364kb | C++17 | 2.0kb | 2022-02-07 16:09:20 | 2022-05-06 06:34:48 |
Judging History
answer
// Author: wlzhouzhuan
#include<bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<=(r);i++)
#define per(i,l,r) for(int i=(l);i>=(r);i--)
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define mset(s,t) memset(s,t,sizeof(s))
#define mcpy(s,t) memcpy(s,t,sizeof(t))
#define SZ(x) ((int)x.size())
#define pb push_back
#define eb emplace_back
#define fir first
#define sec second
template<class T1,class T2>bool ckmax(T1 &a,T2 b){if(a<b)return a=b,1;else return 0;}
template<class T1,class T2>bool ckmin(T1 &a,T2 b){if(a>b)return a=b,1;else return 0;}
inline int read(){
int x=0,f=0;char ch=getchar();
while(!isdigit(ch))f|=ch=='-',ch=getchar();
while(isdigit(ch))x=10*x+ch-'0',ch=getchar();
return f?-x:x;
}
template<typename T>void print(T x){
if(x<0)putchar('-'),x=-x;
if(x>=10)print(x/10);
putchar(x%10+'0');
}
template<typename T>void print(T x,char ch){
print(x),putchar(ch);
}
const int N=1000005;
const int inf=2e9;
struct Info{
ll l,r,V;
Info(ll _x=0,ll _r=0){
l=_x-_r,r=_x+_r,V=_r*_r;
}
friend bool operator < (const Info &a,const Info &b){
return a.r!=b.r?a.r<b.r:a.l<b.l;
}
}b[N];
int len;
int a[N],d[N],n;
ll dp[N];
int main(){
n=read();
rep(i,1,n)a[i]=read(),d[i]=a[i]-a[i-1];
d[1]=d[n+1]=inf;
rep(i,1,n)b[++len]=Info(a[i],min(d[i],d[i+1]));
rep(i,1,n){
int nowr=d[i+1];
per(j,i-1,2){
int r=d[j+1]-nowr;
if(r<0||r>d[j]||r>=nowr)break;
b[++len]=Info(a[j],r);
nowr=r;
}
}
rep(i,1,n){
int nowr=d[i];
rep(j,i+1,n-1){
int r=d[j]-nowr;
if(r<0||r>d[j]||r>=nowr)break;
b[++len]=Info(a[j],r);
nowr=r;
}
}
sort(b+1,b+len+1);
rep(i,1,len){
dp[i]=dp[i-1];
int j=upper_bound(b+1,b+len+1,Info(b[i].l))-b-1;
ckmax(dp[i],dp[j]+b[i].V);
}
print(dp[len],'\n');
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 28868kb
input:
3 0 2 5
output:
13
result:
ok answer is '13'
Test #2:
score: 0
Accepted
time: 4ms
memory: 28412kb
input:
4 0 1 3 6
output:
10
result:
ok answer is '10'
Test #3:
score: 0
Accepted
time: 5ms
memory: 27864kb
input:
5 5 7 12 13 15
output:
9
result:
ok answer is '9'
Test #4:
score: 0
Accepted
time: 5ms
memory: 28848kb
input:
3000 991000000 991000001 991000004 991000009 991000016 991000025 991000036 991000049 991000064 991000081 991000100 991000121 991000144 991000169 991000196 991000225 991000256 991000289 991000324 991000361 991000400 991000441 991000484 991000529 991000576 991000625 991000676 991000729 991000784 99100...
output:
17990999500
result:
ok answer is '17990999500'
Test #5:
score: 0
Accepted
time: 12ms
memory: 27232kb
input:
3000 469288311 469288312 469288315 469288320 469288327 469288336 469288347 469288360 469288375 469288392 469288411 469288432 469288455 469288480 469288507 469288536 469288567 469288600 469288635 469288672 469288711 469288752 469288795 469288840 469288887 469288936 469288987 469289040 469289095 46928...
output:
17990999500
result:
ok answer is '17990999500'
Test #6:
score: 0
Accepted
time: 5ms
memory: 28688kb
input:
3000 955107586 955107587 955107590 955107595 955107602 955107611 955107622 955107635 955107650 955107667 955107686 955107707 955107730 955107755 955107782 955107811 955107842 955107875 955107910 955107947 955107986 955108027 955108070 955108115 955108162 955108211 955108262 955108315 955108370 95510...
output:
17990999500
result:
ok answer is '17990999500'
Test #7:
score: 0
Accepted
time: 5ms
memory: 27928kb
input:
3000 122729598 122729599 122729602 122729607 122729614 122729623 122729634 122729647 122729662 122729679 122729698 122729719 122729742 122729767 122729794 122729823 122729854 122729887 122729922 122729959 122729998 122730039 122730082 122730127 122730174 122730223 122730274 122730327 122730382 12273...
output:
17990999500
result:
ok answer is '17990999500'
Test #8:
score: 0
Accepted
time: 6ms
memory: 28044kb
input:
3000 48103351 48103352 48103355 48103360 48103367 48103376 48103387 48103400 48103415 48103432 48103451 48103472 48103495 48103520 48103547 48103576 48103607 48103640 48103675 48103712 48103751 48103792 48103835 48103880 48103927 48103976 48104027 48104080 48104135 48104192 48104251 48104312 4810437...
output:
17990999500
result:
ok answer is '17990999500'
Test #9:
score: 0
Accepted
time: 7ms
memory: 28848kb
input:
3000 229465796 229465797 229465800 229465805 229465812 229465821 229465832 229465845 229465860 229465877 229465896 229465917 229465940 229465965 229465992 229466021 229466052 229466085 229466120 229466157 229466196 229466237 229466280 229466325 229466372 229466421 229466472 229466525 229466580 22946...
output:
17990999500
result:
ok answer is '17990999500'
Test #10:
score: 0
Accepted
time: 4ms
memory: 27068kb
input:
3000 299213555 299213556 299213559 299213564 299213571 299213580 299213591 299213604 299213619 299213636 299213655 299213676 299213699 299213724 299213751 299213780 299213811 299213844 299213879 299213916 299213955 299213996 299214039 299214084 299214131 299214180 299214231 299214284 299214339 29921...
output:
17990999500
result:
ok answer is '17990999500'
Test #11:
score: 0
Accepted
time: 2ms
memory: 28324kb
input:
3000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
1500
result:
ok answer is '1500'
Test #12:
score: 0
Accepted
time: 0ms
memory: 28232kb
input:
3000 569273900 569273901 569273904 569273909 569273916 569273925 569273936 569273949 569273964 569273981 569274000 569274021 569274044 569274069 569274096 569274125 569274156 569274189 569274224 569274261 569274300 569274341 569274384 569274429 569274476 569274525 569274576 569274629 569274684 56927...
output:
17990999500
result:
ok answer is '17990999500'
Test #13:
score: 0
Accepted
time: 9ms
memory: 27220kb
input:
3000 15328 30656 45984 61312 76640 91968 107296 122624 137952 153280 168608 183936 199264 214592 229920 245248 260576 275904 291232 306560 321888 337216 352544 367872 383200 398528 413856 429184 444512 459840 475168 490496 505824 521152 536480 551808 567136 582464 597792 613120 628448 643776 659104 ...
output:
352421376000
result:
ok answer is '352421376000'
Test #14:
score: 0
Accepted
time: 5ms
memory: 28656kb
input:
3000 32543 65086 97629 130172 162715 195258 227801 260344 292887 325430 357973 390516 423059 455602 488145 520688 553231 585774 618317 650860 683403 715946 748489 781032 813575 846118 878661 911204 943747 976290 1008833 1041376 1073919 1106462 1139005 1171548 1204091 1236634 1269177 1301720 1334263 ...
output:
1588570273500
result:
ok answer is '1588570273500'
Test #15:
score: 0
Accepted
time: 5ms
memory: 27664kb
input:
3000 30008 60016 90024 120032 150040 180048 210056 240064 270072 300080 330088 360096 390104 420112 450120 480128 510136 540144 570152 600160 630168 660176 690184 720192 750200 780208 810216 840224 870232 900240 930248 960256 990264 1020272 1050280 1080288 1110296 1140304 1170312 1200320 1230328 126...
output:
1350720096000
result:
ok answer is '1350720096000'
Test #16:
score: 0
Accepted
time: 4ms
memory: 27336kb
input:
3000 250004 500008 750012 1000016 1250020 1500024 1750028 2000032 2250036 2500040 2750044 3000048 3250052 3500056 3750060 4000064 4250068 4500072 4750076 5000080 5250084 5500088 5750092 6000096 6250100 6500104 6750108 7000112 7250116 7500120 7750124 8000128 8250132 8500136 8750140 9000144 9250148 95...
output:
93753000024000
result:
ok answer is '93753000024000'
Test #17:
score: 0
Accepted
time: 2ms
memory: 28852kb
input:
3000 253470 506940 760410 1013880 1267350 1520820 1774290 2027760 2281230 2534700 2788170 3041640 3295110 3548580 3802050 4055520 4308990 4562460 4815930 5069400 5322870 5576340 5829810 6083280 6336750 6590220 6843690 7097160 7350630 7604100 7857570 8111040 8364510 8617980 8871450 9124920 9378390 96...
output:
96370561350000
result:
ok answer is '96370561350000'
Test #18:
score: 0
Accepted
time: 6ms
memory: 28456kb
input:
3000 58005 116010 174015 232020 290025 348030 406035 464040 522045 580050 638055 696060 754065 812070 870075 928080 986085 1044090 1102095 1160100 1218105 1276110 1334115 1392120 1450125 1508130 1566135 1624140 1682145 1740150 1798155 1856160 1914165 1972170 2030175 2088180 2146185 2204190 2262195 2...
output:
5046870037500
result:
ok answer is '5046870037500'
Test #19:
score: 0
Accepted
time: 0ms
memory: 27952kb
input:
3000 93676 187352 281028 374704 468380 562056 655732 749408 843084 936760 1030436 1124112 1217788 1311464 1405140 1498816 1592492 1686168 1779844 1873520 1967196 2060872 2154548 2248224 2341900 2435576 2529252 2622928 2716604 2810280 2903956 2997632 3091308 3184984 3278660 3372336 3466012 3559688 36...
output:
13162789464000
result:
ok answer is '13162789464000'
Test #20:
score: 0
Accepted
time: 1ms
memory: 28548kb
input:
3000 30878 61756 92634 123512 154390 185268 216146 247024 277902 308780 339658 370536 401414 432292 463170 494048 524926 555804 586682 617560 648438 679316 710194 741072 771950 802828 833706 864584 895462 926340 957218 988096 1018974 1049852 1080730 1111608 1142486 1173364 1204242 1235120 1265998 12...
output:
1430176326000
result:
ok answer is '1430176326000'
Test #21:
score: 0
Accepted
time: 2ms
memory: 28516kb
input:
3000 203919 407838 611757 815676 1019595 1223514 1427433 1631352 1835271 2039190 2243109 2447028 2650947 2854866 3058785 3262704 3466623 3670542 3874461 4078380 4282299 4486218 4690137 4894056 5097975 5301894 5505813 5709732 5913651 6117570 6321489 6525408 6729327 6933246 7137165 7341084 7545003 774...
output:
62374437841500
result:
ok answer is '62374437841500'
Test #22:
score: 0
Accepted
time: 1ms
memory: 28504kb
input:
3000 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 17...
output:
6000
result:
ok answer is '6000'
Test #23:
score: 0
Accepted
time: 4ms
memory: 27588kb
input:
3000 174575 349150 523725 698300 872875 1047450 1222025 1396600 1571175 1745750 1920325 2094900 2269475 2444050 2618625 2793200 2967775 3142350 3316925 3491500 3666075 3840650 4015225 4189800 4364375 4538950 4713525 4888100 5062675 5237250 5411825 5586400 5760975 5935550 6110125 6284700 6459275 6633...
output:
45714645937500
result:
ok answer is '45714645937500'
Test #24:
score: 0
Accepted
time: 11ms
memory: 28640kb
input:
3000 2641 8335 14031 19729 25429 31131 36835 42541 48249 53959 59671 65385 71101 76819 82539 88261 93985 99711 105439 111169 116901 122635 128371 134109 139849 145591 151335 157081 162829 168579 174331 180085 185841 191599 197359 203121 208885 214651 220419 226189 231961 237735 243511 249289 255069 ...
output:
117826294000
result:
ok answer is '117826294000'
Test #25:
score: 0
Accepted
time: 4ms
memory: 28356kb
input:
3000 5696 9554 13414 17276 21140 25006 28874 32744 36616 40490 44366 48244 52124 56006 59890 63776 67664 71554 75446 79340 83236 87134 91034 94936 98840 102746 106654 110564 114476 118390 122306 126224 130144 134066 137990 141916 145844 149774 153706 157640 161576 165514 169454 173396 177340 181286 ...
output:
75007102000
result:
ok answer is '75007102000'
Test #26:
score: 0
Accepted
time: 2ms
memory: 27424kb
input:
3000 3504 10997 18492 25989 33488 40989 48492 55997 63504 71013 78524 86037 93552 101069 108588 116109 123632 131157 138684 146213 153744 161277 168812 176349 183888 191429 198972 206517 214064 221613 229164 236717 244272 251829 259388 266949 274512 282077 289644 297213 304784 312357 319932 327509 3...
output:
169591619500
result:
ok answer is '169591619500'
Test #27:
score: 0
Accepted
time: 3ms
memory: 27696kb
input:
3000 5391 11151 16913 22677 28443 34211 39981 45753 51527 57303 63081 68861 74643 80427 86213 92001 97791 103583 109377 115173 120971 126771 132573 138377 144183 149991 155801 161613 167427 173243 179061 184881 190703 196527 202353 208181 214011 219843 225677 231513 237351 243191 249033 254877 26072...
output:
119553844000
result:
ok answer is '119553844000'
Test #28:
score: 0
Accepted
time: 2ms
memory: 27288kb
input:
3000 8508 11638 14770 17904 21040 24178 27318 30460 33604 36750 39898 43048 46200 49354 52510 55668 58828 61990 65154 68320 71488 74658 77830 81004 84180 87358 90538 93720 96904 100090 103278 106468 109660 112854 116050 119248 122448 125650 128854 132060 135268 138478 141690 144904 148120 151338 154...
output:
60828574000
result:
ok answer is '60828574000'
Test #29:
score: 0
Accepted
time: 5ms
memory: 27932kb
input:
3000 8547 15279 22013 28749 35487 42227 48969 55713 62459 69207 75957 82709 89463 96219 102977 109737 116499 123263 130029 136797 143567 150339 157113 163889 170667 177447 184229 191013 197799 204587 211377 218169 224963 231759 238557 245357 252159 258963 265769 272577 279387 286199 293013 299829 30...
output:
146509348000
result:
ok answer is '146509348000'
Test #30:
score: 0
Accepted
time: 4ms
memory: 27664kb
input:
3000 1494 10300 19108 27918 36730 45544 54360 63178 71998 80820 89644 98470 107298 116128 124960 133794 142630 151468 160308 169150 177994 186840 195688 204538 213390 222244 231100 239958 248818 257680 266544 275410 284278 293148 302020 310894 319770 328648 337528 346410 355294 364180 373068 381958 ...
output:
213501622000
result:
ok answer is '213501622000'
Test #31:
score: 0
Accepted
time: 2ms
memory: 27744kb
input:
3000 9535 17736 25939 34144 42351 50560 58771 66984 75199 83416 91635 99856 108079 116304 124531 132760 140991 149224 157459 165696 173935 182176 190419 198664 206911 215160 223411 231664 239919 248176 256435 264696 272959 281224 289491 297760 306031 314304 322579 330856 339135 347416 355699 363984 ...
output:
192626399500
result:
ok answer is '192626399500'
Test #32:
score: 0
Accepted
time: 3ms
memory: 28552kb
input:
3000 545 6485 12427 18371 24317 30265 36215 42167 48121 54077 60035 65995 71957 77921 83887 89855 95825 101797 107771 113747 119725 125705 131687 137671 143657 149645 155635 161627 167621 173617 179615 185615 191617 197621 203627 209635 215645 221657 227671 233687 239705 245725 251747 257771 263797 ...
output:
124331764000
result:
ok answer is '124331764000'
Test #33:
score: 0
Accepted
time: 6ms
memory: 27600kb
input:
3000 0 333333 666666 999999 1333332 1666665 1999998 2333331 2666664 2999997 3333330 3666663 3999996 4333329 4666662 4999995 5333328 5666661 5999994 6333327 6666660 6999993 7333326 7666659 7999992 8333325 8666658 8999991 9333324 9666657 9999990 10333323 10666656 10999989 11333322 11666655 11999988 12...
output:
166666333333500
result:
ok answer is '166666333333500'
Test #34:
score: 0
Accepted
time: 3ms
memory: 27812kb
input:
3000 4578 11446 18316 25188 32062 38938 45816 52696 59578 66462 73348 80236 87126 94018 100912 107808 114706 121606 128508 135412 142318 149226 156136 163048 169962 176878 183796 190716 197638 204562 211488 218416 225346 232278 239212 246148 253086 260026 266968 273912 280858 287806 294756 301708 30...
output:
150506932000
result:
ok answer is '150506932000'
Test #35:
score: 0
Accepted
time: 2ms
memory: 28360kb
input:
3000 61107009 61345627 61584245 61822863 62061481 62300099 62538717 62777335 63015953 63254571 63493189 63731807 63970425 64209043 64447661 64686279 64924897 65163515 65402133 65640751 65879369 66117987 66356605 66595223 66833841 67072459 67311077 67549695 67788313 68026931 68265549 68504167 6874278...
output:
85407824886000
result:
ok answer is '85407824886000'
Test #36:
score: 0
Accepted
time: 2ms
memory: 27920kb
input:
3000 41646653 41820499 41994345 42168191 42342037 42515883 42689729 42863575 43037421 43211267 43385113 43558959 43732805 43906651 44080497 44254343 44428189 44602035 44775881 44949727 45123573 45297419 45471265 45645111 45818957 45992803 46166649 46340495 46514341 46688187 46862033 47035879 4720972...
output:
45333647574000
result:
ok answer is '45333647574000'
Test #37:
score: 0
Accepted
time: 2ms
memory: 28976kb
input:
3000 356588627 356716671 356844715 356972759 357100803 357228847 357356891 357484935 357612979 357741023 357869067 357997111 358125155 358253199 358381243 358509287 358637331 358765375 358893419 359021463 359149507 359277551 359405595 359533639 359661683 359789727 359917771 360045815 360173859 36030...
output:
24592898904000
result:
ok answer is '24592898904000'
Test #38:
score: 0
Accepted
time: 4ms
memory: 28648kb
input:
3000 160719353 160903102 161086851 161270600 161454349 161638098 161821847 162005596 162189345 162373094 162556843 162740592 162924341 163108090 163291839 163475588 163659337 163843086 164026835 164210584 164394333 164578082 164761831 164945580 165129329 165313078 165496827 165680576 165864325 16604...
output:
50645542501500
result:
ok answer is '50645542501500'
Test #39:
score: 0
Accepted
time: 2ms
memory: 27972kb
input:
3000 603380361 603496299 603612237 603728175 603844113 603960051 604075989 604191927 604307865 604423803 604539741 604655679 604771617 604887555 605003493 605119431 605235369 605351307 605467245 605583183 605699121 605815059 605930997 606046935 606162873 606278811 606394749 606510687 606626625 60674...
output:
20162429766000
result:
ok answer is '20162429766000'
Test #40:
score: 0
Accepted
time: 12ms
memory: 27412kb
input:
3000 25430654 25612496 25794338 25976180 26158022 26339864 26521706 26703548 26885390 27067232 27249074 27430916 27612758 27794600 27976442 28158284 28340126 28521968 28703810 28885652 29067494 29249336 29431178 29613020 29794862 29976704 30158546 30340388 30522230 30704072 30885914 31067756 3124959...
output:
49599769446000
result:
ok answer is '49599769446000'
Test #41:
score: 0
Accepted
time: 110ms
memory: 37768kb
input:
300000 574 1206 1838 2470 3102 3734 4366 4998 5630 6262 6894 7526 8158 8790 9422 10054 10686 11318 11950 12582 13214 13846 14478 15110 15742 16374 17006 17638 18270 18902 19534 20166 20798 21430 22062 22694 23326 23958 24590 25222 25854 26486 27118 27750 28382 29014 29646 30278 30910 31542 32174 328...
output:
59913600000
result:
ok answer is '59913600000'
Test #42:
score: 0
Accepted
time: 112ms
memory: 38364kb
input:
300000 490 585 680 775 870 965 1060 1155 1250 1345 1440 1535 1630 1725 1820 1915 2010 2105 2200 2295 2390 2485 2580 2675 2770 2865 2960 3055 3150 3245 3340 3435 3530 3625 3720 3815 3910 4005 4100 4195 4290 4385 4480 4575 4670 4765 4860 4955 5050 5145 5240 5335 5430 5525 5620 5715 5810 5905 6000 6095...
output:
1353750000
result:
ok answer is '1353750000'
Test #43:
score: 0
Accepted
time: 125ms
memory: 37228kb
input:
300000 301 1638 2975 4312 5649 6986 8323 9660 10997 12334 13671 15008 16345 17682 19019 20356 21693 23030 24367 25704 27041 28378 29715 31052 32389 33726 35063 36400 37737 39074 40411 41748 43085 44422 45759 47096 48433 49770 51107 52444 53781 55118 56455 57792 59129 60466 61803 63140 64477 65814 67...
output:
268135350000
result:
ok answer is '268135350000'
Test #44:
score: 0
Accepted
time: 112ms
memory: 37276kb
input:
300000 733 1527 2321 3115 3909 4703 5497 6291 7085 7879 8673 9467 10261 11055 11849 12643 13437 14231 15025 15819 16613 17407 18201 18995 19789 20583 21377 22171 22965 23759 24553 25347 26141 26935 27729 28523 29317 30111 30905 31699 32493 33287 34081 34875 35669 36463 37257 38051 38845 39639 40433 ...
output:
94565400000
result:
ok answer is '94565400000'
Test #45:
score: 0
Accepted
time: 116ms
memory: 37936kb
input:
300000 318 2442 4566 6690 8814 10938 13062 15186 17310 19434 21558 23682 25806 27930 30054 32178 34302 36426 38550 40674 42798 44922 47046 49170 51294 53418 55542 57666 59790 61914 64038 66162 68286 70410 72534 74658 76782 78906 81030 83154 85278 87402 89526 91650 93774 95898 98022 100146 102270 104...
output:
676706400000
result:
ok answer is '676706400000'
Test #46:
score: 0
Accepted
time: 122ms
memory: 37416kb
input:
300000 388 2979 5570 8161 10752 13343 15934 18525 21116 23707 26298 28889 31480 34071 36662 39253 41844 44435 47026 49617 52208 54799 57390 59981 62572 65163 67754 70345 72936 75527 78118 80709 83300 85891 88482 91073 93664 96255 98846 101437 104028 106619 109210 111801 114392 116983 119574 122165 1...
output:
1006992150000
result:
ok answer is '1006992150000'
Test #47:
score: 0
Accepted
time: 16ms
memory: 28388kb
input:
44721 248 249 251 254 258 263 269 276 284 293 303 314 326 339 353 368 384 401 419 438 458 479 501 524 548 573 599 626 654 683 713 744 776 809 843 878 914 951 989 1028 1068 1109 1151 1194 1238 1283 1329 1376 1424 1473 1523 1574 1626 1679 1733 1788 1844 1901 1959 2018 2078 2139 2201 2264 2328 2393 245...
output:
14906760295441
result:
ok answer is '14906760295441'
Test #48:
score: 0
Accepted
time: 25ms
memory: 29696kb
input:
44721 75 76 78 81 85 90 96 103 111 120 130 141 153 166 180 195 211 228 246 265 285 306 328 351 375 400 426 453 481 510 540 571 603 636 670 705 741 778 816 855 895 936 978 1021 1065 1110 1156 1203 1251 1300 1350 1401 1453 1506 1560 1615 1671 1728 1786 1845 1905 1966 2028 2091 2155 2220 2286 2353 2421...
output:
14906760295441
result:
ok answer is '14906760295441'
Test #49:
score: 0
Accepted
time: 21ms
memory: 29728kb
input:
44721 889 890 892 895 899 904 910 917 925 934 944 955 967 980 994 1009 1025 1042 1060 1079 1099 1120 1142 1165 1189 1214 1240 1267 1295 1324 1354 1385 1417 1450 1484 1519 1555 1592 1630 1669 1709 1750 1792 1835 1879 1924 1970 2017 2065 2114 2164 2215 2267 2320 2374 2429 2485 2542 2600 2659 2719 2780...
output:
14906760295441
result:
ok answer is '14906760295441'
Test #50:
score: 0
Accepted
time: 18ms
memory: 28572kb
input:
44721 134 135 137 140 144 149 155 162 170 179 189 200 212 225 239 254 270 287 305 324 344 365 387 410 434 459 485 512 540 569 599 630 662 695 729 764 800 837 875 914 954 995 1037 1080 1124 1169 1215 1262 1310 1359 1409 1460 1512 1565 1619 1674 1730 1787 1845 1904 1964 2025 2087 2150 2214 2279 2345 2...
output:
14906760295441
result:
ok answer is '14906760295441'
Test #51:
score: 0
Accepted
time: 115ms
memory: 37132kb
input:
300000 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100...
output:
150000
result:
ok answer is '150000'
Test #52:
score: 0
Accepted
time: 18ms
memory: 28116kb
input:
44721 564 565 567 570 574 579 585 592 600 609 619 630 642 655 669 684 700 717 735 754 774 795 817 840 864 889 915 942 970 999 1029 1060 1092 1125 1159 1194 1230 1267 1305 1344 1384 1425 1467 1510 1554 1599 1645 1692 1740 1789 1839 1890 1942 1995 2049 2104 2160 2217 2275 2334 2394 2455 2517 2580 2644...
output:
14906760295441
result:
ok answer is '14906760295441'
Test #53:
score: 0
Accepted
time: 98ms
memory: 34476kb
input:
300000 455 2965 4907 7417 9359 11869 13811 16321 18263 20773 22715 25225 27167 29677 31619 34129 36071 38581 40523 43033 44975 47485 49427 51937 53879 56389 58331 60841 62783 65293 67235 69745 71687 74197 76139 78649 80591 83101 85043 87553 89495 92005 93947 96457 98399 100909 102851 105361 107303 1...
output:
565710302720
result:
ok answer is '565710302720'
Test #54:
score: 0
Accepted
time: 44ms
memory: 33128kb
input:
300000 632 2088 2681 4137 4730 6186 6779 8235 8828 10284 10877 12333 12926 14382 14975 16431 17024 18480 19073 20529 21122 22578 23171 24627 25220 26676 27269 28725 29318 30774 31367 32823 33416 34872 35465 36921 37514 38970 39563 41019 41612 43068 43661 45117 45710 47166 47759 49215 49808 51264 518...
output:
52751238223
result:
ok answer is '52751238223'
Test #55:
score: 0
Accepted
time: 102ms
memory: 35256kb
input:
300000 59 2808 5316 8065 10573 13322 15830 18579 21087 23836 26344 29093 31601 34350 36858 39607 42115 44864 47372 50121 52629 55378 57886 60635 63143 65892 68400 71149 73657 76406 78914 81663 84171 86920 89428 92177 94685 97434 99942 102691 105199 107948 110456 113205 115713 118462 120970 123719 12...
output:
943512250036
result:
ok answer is '943512250036'
Test #56:
score: 0
Accepted
time: 114ms
memory: 34284kb
input:
300000 666 2029 3402 4765 6138 7501 8874 10237 11610 12973 14346 15709 17082 18445 19818 21181 22554 23917 25290 26653 28026 29389 30762 32125 33498 34861 36234 37597 38970 40333 41706 43069 44442 45805 47178 48541 49914 51277 52650 54013 55386 56749 58122 59485 60858 62221 63594 64957 66330 67693 6...
output:
278665350000
result:
ok answer is '278665350000'
Test #57:
score: 0
Accepted
time: 49ms
memory: 33640kb
input:
300000 793 1429 3966 4602 7139 7775 10312 10948 13485 14121 16658 17294 19831 20467 23004 23640 26177 26813 29350 29986 32523 33159 35696 36332 38869 39505 42042 42678 45215 45851 48388 49024 51561 52197 54734 55370 57907 58543 61080 61716 64253 64889 67426 68062 70599 71235 73772 74408 76945 77581 ...
output:
60674400000
result:
ok answer is '60674400000'
Test #58:
score: 0
Accepted
time: 95ms
memory: 34836kb
input:
300000 582 2419 3709 5546 6836 8673 9963 11800 13090 14927 16217 18054 19344 21181 22471 24308 25598 27435 28725 30562 31852 33689 34979 36816 38106 39943 41233 43070 44360 46197 47487 49324 50614 52451 53741 55578 56868 58705 59995 61832 63122 64959 66249 68086 69376 71213 72503 74340 75630 77467 7...
output:
249619019356
result:
ok answer is '249619019356'
Test #59:
score: 0
Accepted
time: 41ms
memory: 31784kb
input:
300000 16 2920 3308 6212 6600 9504 9892 12796 13184 16088 16476 19380 19768 22672 23060 25964 26352 29256 29644 32548 32936 35840 36228 39132 39520 42424 42812 45716 46104 49008 49396 52300 52688 55592 55980 58884 59272 62176 62564 65468 65856 68760 69148 72052 72440 75344 75732 78636 79024 81928 82...
output:
22598315888
result:
ok answer is '22598315888'
Test #60:
score: 0
Accepted
time: 99ms
memory: 35748kb
input:
300000 185 2021 3726 5562 7267 9103 10808 12644 14349 16185 17890 19726 21431 23267 24972 26808 28513 30349 32054 33890 35595 37431 39136 40972 42677 44513 46218 48054 49759 51595 53300 55136 56841 58677 60382 62218 63923 65759 67464 69300 71005 72841 74546 76382 78087 79923 81628 83464 85169 87005 ...
output:
436054712064
result:
ok answer is '436054712064'
Test #61:
score: 0
Accepted
time: 39ms
memory: 32188kb
input:
300000 187 554 1809 2176 3431 3798 5053 5420 6675 7042 8297 8664 9919 10286 11541 11908 13163 13530 14785 15152 16407 16774 18029 18396 19651 20018 21273 21640 22895 23262 24517 24884 26139 26506 27761 28128 29383 29750 31005 31372 32627 32994 34249 34616 35871 36238 37493 37860 39115 39482 40737 41...
output:
20203350000
result:
ok answer is '20203350000'
Test #62:
score: 0
Accepted
time: 119ms
memory: 38268kb
input:
300000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
150000
result:
ok answer is '150000'
Test #63:
score: 0
Accepted
time: 111ms
memory: 34828kb
input:
300000 55 2179 4673 6797 9291 11415 13909 16033 18527 20651 23145 25269 27763 29887 32381 34505 36999 39123 41617 43741 46235 48359 50853 52977 55471 57595 60089 62213 64707 66831 69325 71449 73943 76067 78561 80685 83179 85303 87797 89921 92415 94539 97033 99157 101651 103775 106269 108393 110887 1...
output:
676706400000
result:
ok answer is '676706400000'
Test #64:
score: 0
Accepted
time: 140ms
memory: 38248kb
input:
300000 999700001 999700002 999700003 999700004 999700005 999700006 999700007 999700008 999700009 999700010 999700011 999700012 999700013 999700014 999700015 999700016 999700017 999700018 999700019 999700020 999700021 999700022 999700023 999700024 999700025 999700026 999700027 999700028 999700029 999...
output:
150000
result:
ok answer is '150000'
Test #65:
score: 0
Accepted
time: 118ms
memory: 36712kb
input:
300000 999700000 999700001 999700002 999700003 999700004 999700005 999700006 999700007 999700008 999700009 999700010 999700011 999700012 999700013 999700014 999700015 999700016 999700017 999700018 999700019 999700020 999700021 999700022 999700023 999700024 999700025 999700026 999700027 999700028 999...
output:
150000
result:
ok answer is '150000'
Test #66:
score: 0
Accepted
time: 17ms
memory: 27852kb
input:
31622 0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 1764 1849 1936 2025 2116 2209 2304 2401 2500 2601 2704 2809 2916 3025 3136 3249 3364 3481 3600 3721 3844 3969 4096 4225 4356 4489 ...
output:
21079297946411
result:
ok answer is '21079297946411'
Test #67:
score: 0
Accepted
time: 12ms
memory: 29216kb
input:
31622 112359 175600 238839 302076 365311 428544 491775 555004 618231 681456 744679 807900 871119 934336 997551 1060764 1123975 1187184 1250391 1313596 1376799 1440000 1503199 1566396 1629591 1692784 1755975 1819164 1882351 1945536 2008719 2071900 2135079 2198256 2261431 2324604 2387775 2450944 25141...
output:
21079297946411
result:
ok answer is '21079297946411'
Test #68:
score: 0
Accepted
time: 15ms
memory: 29232kb
input:
31622 1 2 5 10 17 26 37 50 65 82 101 122 145 170 197 226 257 290 325 362 401 442 485 530 577 626 677 730 785 842 901 962 1025 1090 1157 1226 1297 1370 1445 1522 1601 1682 1765 1850 1937 2026 2117 2210 2305 2402 2501 2602 2705 2810 2917 3026 3137 3250 3365 3482 3601 3722 3845 3970 4097 4226 4357 4490...
output:
21079297946411
result:
ok answer is '21079297946411'
Test #69:
score: 0
Accepted
time: 14ms
memory: 28956kb
input:
31622 112358 175599 238838 302075 365310 428543 491774 555003 618230 681455 744678 807899 871118 934335 997550 1060763 1123974 1187183 1250390 1313595 1376798 1439999 1503198 1566395 1629590 1692783 1755974 1819163 1882350 1945535 2008718 2071899 2135078 2198255 2261430 2324603 2387774 2450943 25141...
output:
21079297946411
result:
ok answer is '21079297946411'
Test #70:
score: 0
Accepted
time: 111ms
memory: 38136kb
input:
300000 556 1572 2588 3604 4620 5636 6652 7668 8684 9700 10716 11732 12748 13764 14780 15796 16812 17828 18844 19860 20876 21892 22908 23924 24940 25956 26972 27988 29004 30020 31036 32052 33068 34084 35100 36116 37132 38148 39164 40180 41196 42212 43228 44244 45260 46276 47292 48308 49324 50340 5135...
output:
154838400000
result:
ok answer is '154838400000'
Test #71:
score: -100
Wrong Answer
time: 8ms
memory: 28080kb
input:
2382 120614 286696 700853 1332470 1385778 1474010 1536817 1809294 1901314 2505025 3420089 3928241 3957949 4055523 4169081 4802670 5358880 5554628 5629669 6469437 6522451 7459358 7786242 8046117 8366424 8413976 9383587 9490673 10483468 11884173 12306533 12339403 13034944 13199750 13345748 13829365 13...
output:
158620167523871
result:
wrong answer expected '152273832303466', found '158620167523871'