QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#330286 | #7455. stcm | NOI_AK_ME | AC ✓ | 172ms | 17500kb | C++23 | 1.9kb | 2024-02-17 14:16:21 | 2024-02-17 14:16:23 |
Judging History
answer
#include <stdio.h>
#include <iostream>
#include <vector>
using namespace std;
using u32 = unsigned;
#define int u32
constexpr u32 N = 100009;
#define lc ((i) << 1 | 1)
#define rc ((i) + 1 << 1)
inline char nc()
{
static char buf[99999],*l,*r;
return l==r&&(r=(l=buf)+fread(buf,1,99999,stdin),l==r)?EOF:*l++;
}
inline char read(int&x)
{
char c=nc();for(;(c^EOF)&&(c<'0'||'9'<c);c=nc());
for(x=0;'0'<=c&&c<='9';x=(x<<3)+(x<<1)+(c^48),c=nc());return c;
}
inline void pc(char x)
{
static char buf[99999],*r=buf;
(!x||(*r++=x,r==buf+99999))&&(fwrite(buf,1,r-buf,stdout),r=buf);
}
inline void pr(int x){if(x>9)pr(x/10);pc(x%10+'0');}
int n,h[N],nxt[N],dfn[N],mmp[N],sz[N],now;
struct node
{
int l,r,i;
inline bool operator<(const node&kkk)const{return l>kkk.l;}
};vector<node>a[N<<2];
inline int dfs(int i)
{
mmp[now]=i;dfn[i]=now++;sz[i]=1;
for(int j=h[i];j;j=nxt[j])sz[i]+=dfs(j);
return sz[i];
}
inline void add(int i,int l,int r,int ql,int qr,int x)
{
int mid=l+r>>1;
if(l^r)if(qr<=mid){add(lc,l,mid,ql,qr,x);return;}
if(mid<ql){add(rc,mid+1,r,ql,qr,x);return;}
a[i].emplace_back((node){ql,qr,x});
}
inline void o(int i){pc('+');pr(mmp[i]+1);}
inline void work(int i,int l,int r)
{
int cnt=0;
for(int j=0,ll=l,rr=r;j<a[i].size();++j)
{
for(;ll<a[i][j].l;o(ll++),++cnt);
for(int k=a[i][j].r+1;k<=rr;o(k++),++cnt);rr=a[i][j].r;
pc('=');pr(a[i][j].i+1);
}
for(;cnt--;pc('-'));
if(l==r)return;
int mid=l+r>>1;
for(int j=l;j<=mid;o(j++));
work(rc,mid+1,r);
for(int j=mid-l+1;j--;pc('-'));
for(int j=mid+1;j<=r;o(j++));
work(lc,l,mid);
for(int j=r-mid;j--;pc('-'));
}
main()
{
if(read(n)==EOF)return pc(0),0;
for(int i=0;i<n;h[i++]=0);for(int i=0;i<N<<2;a[i++].clear());
for(int i=1,f;i<n;++i)read(f),--f,nxt[i]=h[f],h[f]=i;
now=0;dfs(0);
for(int i=0;i<n;++i)add(0,0,n-1,dfn[i],dfn[i]+sz[i]-1,i);
work(0,0,n-1);pc('!');pc('\n');
main();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 33ms
memory: 7184kb
input:
1000 1 1 2 1 1 2 2 7 2 7 3 11 10 6 4 8 10 13 16 2 19 7 6 18 6 2 16 27 21 14 6 14 14 29 12 13 3 27 28 27 2 34 26 27 44 14 30 25 7 50 47 1 36 24 4 32 10 20 53 52 61 23 43 39 2 15 47 9 14 54 48 53 36 14 14 66 76 55 17 67 21 22 18 25 67 75 7 48 21 6 35 11 31 41 63 28 6 98 51 3 29 52 102 77 27 58 39 64 9...
output:
=1+1+569+772+243+940+494+882+812+177+441+570+968+732+773+727+435+905+754+323+665+980+426+206+843+798+622+412+53+175+590+619+129+994+778+73+691+873+650+136+468+523+60+531+195+6+661+368+548+319+983+837+202+601+421+362+342+291+481+678+696+167+649+874+521+247+764+192+663+598+346+347+290+936+400+98+473+4...
result:
ok 16023 / 768349 / 447232
Test #2:
score: 0
Accepted
time: 152ms
memory: 15872kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 1668928 / 2753395 / 2877988
Test #3:
score: 0
Accepted
time: 144ms
memory: 17080kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 1668928 / 2956391 / 2639075
Test #4:
score: 0
Accepted
time: 141ms
memory: 15976kb
input:
100000 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:
=1+1+96265+78531+74750+22990+64808+14298+84286+83950+11723+95626+94310+85782+17997+84809+82171+79119+71468+70493+67008+66737+65239+40239+15815+89033+43600+35789=2+2+98407+96113+77957=3+3+93291+78171+46017+26643+53297+48174+20655+57682+57436+37049+32839+30176+60501+38765+35736+27290+76275+65634+52948...
result:
ok 2389463 / 1842030 / 1891500
Test #5:
score: 0
Accepted
time: 144ms
memory: 14728kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 95 33 47 4 54 83 22 90 98 51 7 58 66 61 73 42 15 68 90 88 98 13 96 96 40 21 70 82 22 12 87 100 ...
output:
=1+1+100+99632+99578+99561+99515+99512+99381+99231+99173+99085+99047+99033+98906+98797+98726+98684+98668+98596+98591+98526+98493+98402+98329+98139+98076+98031+98012+97937+97889+97646+97435+97430+97377+97336+97008+97003+96733+96602+96320+96116+95721+95685+95631+95619+95486+95300+95250+95180+95114+949...
result:
ok 2226180 / 2559339 / 2730267
Test #6:
score: 0
Accepted
time: 172ms
memory: 16572kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
=1+1+10000+86267+75170+64835+41979+16866+84513+13721+97117+84124+80188+73393+12142+87816+10852+9999+89892+53778+53004+37747+32602+25613+96824+70871+20803+98541+76273+71607+16698+9998+86388+73001+70042+47178+46164+45192+34367+13051+9997+96293+65765+54371+21474+10461+9996+86673+35768+34338+29662+27126...
result:
ok 2838750 / 2753718 / 2563810
Test #7:
score: 0
Accepted
time: 165ms
memory: 16372kb
input:
100000 1 1 1 1 1 1 1 1 1 7 2 3 11 4 9 5 6 9 10 6 10 3 6 6 7 7 6 4 7 6 7 8 4 7 9 8 8 9 6 4 9 4 9 10 4 2 8 9 9 7 4 5 3 10 8 6 6 8 7 8 7 7 11 2 7 11 6 5 8 6 4 5 10 7 10 11 11 3 4 8 9 7 11 11 3 3 9 6 2 6 3 2 5 10 11 9 6 2 6 8 10 11 3 6 8 3 3 8 6 5 6 3 3 4 7 8 11 7 11 6 2 9 7 8 5 4 11 9 5 4 7 10 10 9 7 3...
output:
=1+1+94508+93102+80056+65544+61456+10+59997+59992+59981+59968+59951+59948+59914+59913+59909+59900+59897+59893+59891+59890+59855+59851+59848+59845+59844+59829+59811+59799+59789+59785+59784+59764+59742+59741+59714+59713+59711+59709+59684+59679+59659+59650+59639+59636+59631+59617+59582+59545+59544+5953...
result:
ok 2415504 / 2952096 / 2899031
Test #8:
score: 0
Accepted
time: 139ms
memory: 14224kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 12 12 13 13 1...
output:
=1+1+19+199+1999+19999+19998+19997+19996+19995+19994+19993+19992+19991+19990+1998+19989+19988+19987+19986+19985+19984+19983+19982+19981+19980+1997+19979+19978+19977+19976+19975+19974+19973+19972+19971+19970+1996+19969+19968+19967+19966+19965+19964+19963+19962+19961+19960+1995+19959+19958+19957+19956...
result:
ok 2843950 / 2711591 / 2561712
Test #9:
score: 0
Accepted
time: 107ms
memory: 13796kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
=1+1+599+598+597+596+595+594+593+592+591+590+589+588+587+586+585+584+583+582+581+580+579+578+577+576+575+574+573+572+571+570+569+568+567+566+565+564+563+562+561+560+559+558+557+556+555+554+553+552+551+550+549+548+547+546+545+544+543+542+541+540+539+538+537+536+535+534+533+532+531+530+529+528+527+526...
result:
ok 2397906 / 2223955 / 2074895
Test #10:
score: 0
Accepted
time: 90ms
memory: 14116kb
input:
100000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...
output:
=1+1+19999+19998+19997+19996+19995+19994+19993+19992+19991+19990+19989+19988+19987+19986+19985+19984+19983+19982+19981+19980+19979+19978+19977+19976+19975+19974+19973+19972+19971+19970+19969+19968+19967+19966+19965+19964+19963+19962+19961+19960+19959+19958+19957+19956+19955+19954+19953+19952+19951+1...
result:
ok 1888930 / 1703925 / 1768892
Test #11:
score: 0
Accepted
time: 115ms
memory: 14432kb
input:
100000 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:
=1+1+100000=2+2+50001=3+3+50002=4+4+50003=5+5+50004=6+6+50005=7+7+50006=8+8+50007=9+9+50008=10+10+50009=11+11+50010=12+12+50011=13+13+50012=14+14+50013=15+15+50014=16+16+50015=17+17+50016=18+18+50017=19+19+50018=20+20+50019=21+21+50020=22+22+50021=23+23+50022=24+24+50023=25+25+50024=26+26+50025=27+2...
result:
ok 1768901 / 1768822 / 1768754
Test #12:
score: 0
Accepted
time: 125ms
memory: 13464kb
input:
100000 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:
=1+1+100000+99000+98000+97000+96000+95000+94000+93000+92000+91000+90000+89000+88000+87000+86000+85000+84000+83000+82000+81000+80000+79000+78000+77000+76000+75000+74000+73000+72000+71000+70000+69000+68000+67000+66000+65000+64000+63000+62000+61000+60000+59000+58000+57000+56000+55000+54000+53000+52000+...
result:
ok 1768331 / 1766971 / 1763365
Test #13:
score: 0
Accepted
time: 105ms
memory: 13500kb
input:
100000 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 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 1 2 3 4 5 6 7 8 ...
output:
=1+1+100000+99950+99900+99850+99800+99750+99700+99650+99600+99550+99500+99450+99400+99350+99300+99250+99200+99150+99100+99050+99000+98950+98900+98850+98800+98750+98700+98650+98600+98550+98500+98450+98400+98350+98300+98250+98200+98150+98100+98050+98000+97950+97900+97850+97800+97750+97700+97650+97600+...
result:
ok 1759803 / 1747678 / 1736428
Test #14:
score: 0
Accepted
time: 96ms
memory: 15444kb
input:
100000 1 2 3 4 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4...
output:
=1+1+100000+99995+99990+99985+99980+99975+99970+99965+99960+99955+99950+99945+99940+99935+99930+99925+99920+99915+99910+99905+99900+99895+99890+99885+99880+99875+99870+99865+99860+99855+99850+99845+99840+99835+99830+99825+99820+99815+99810+99805+99800+99795+99790+99785+99780+99775+99770+99765+99760+...
result:
ok 1723928 / 1668928 / 2070989
Test #15:
score: 0
Accepted
time: 110ms
memory: 14816kb
input:
100000 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 11 6 23 24 25 26 27 28 29 30 31 6 23 24 25 26 27 28 29 30 31 32 27 44 45 46 47 48 49 50 51 52 27 44 45 46 47 48 49 50 51 52 53 48 65 66 67 68 69 70 71 72 73 48 65 66 67 68 69 70 71 72 73 74 69 86 87 88 89 90 91 92 93 94 69 86 87 88 89 90 91 92 93 94 9...
output:
=1+1+12=2+2+13=3+3+14=4+4+15=5+5+16=6+6+33+17+7+18+8+19+9+20+10+21+11+22=23+23+34=24+24+35=25+25+36=26+26+37=27+27+54+38+28+39+29+40+30+41+31+42+32+43=44+44+55=45+45+56=46+46+57=47+47+58=48+48+75+59+49+60+50+61+51+62+52+63+53+64=65+65+76=66+66+77=67+67+78=68+68+79=69+69+96+80+70+81+71+82+72+83+73+84...
result:
ok 2302112 / 2290678 / 2220836
Test #16:
score: 0
Accepted
time: 104ms
memory: 14256kb
input:
100000 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:
=1+1+302=2+2+303=3+3+304=4+4+305=5+5+306=6+6+307=7+7+308=8+8+309=9+9+310=10+10+311=11+11+312=12+12+313=13+13+314=14+14+315=15+15+316=16+16+317=17+17+318=18+18+319=19+19+320=20+20+321=21+21+322=22+22+323=23+23+324=24+24+325=25+25+326=26+26+327=27+27+328=28+28+329=29+29+330=30+30+331=31+31+332=32+32+3...
result:
ok 2146576 / 2059155 / 1982530
Test #17:
score: 0
Accepted
time: 94ms
memory: 15812kb
input:
100000 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:
=1+1+10002=2+2+10003=3+3+10004=4+4+10005=5+5+10006=6+6+10007=7+7+10008=8+8+10009=9+9+10010=10+10+10011=11+11+10012=12+12+10013=13+13+10014=14+14+10015=15+15+10016=16+16+10017=17+17+10018=18+18+10019=19+19+10020=20+20+10021=21+21+10022=22+22+10023=23+23+10024=24+24+10025=25+25+10026=26+26+10027=27+27...
result:
ok 1896381 / 2070989 / 1768899
Test #18:
score: 0
Accepted
time: 130ms
memory: 16668kb
input:
100000 1 1 1 4 4 4 4 4 9 10 10 10 10 14 14 14 14 14 14 14 14 22 23 24 25 26 27 27 29 30 30 30 33 34 35 36 36 38 38 40 40 40 40 44 44 44 47 47 49 49 49 49 49 54 54 56 57 57 59 59 61 61 63 64 65 65 67 67 67 70 71 71 71 71 75 75 75 75 75 75 75 75 83 83 85 85 85 88 89 89 91 91 91 91 95 96 97 98 98 98 10...
output:
=1+1+3+2=4+4+8+7+6+5=9+9=10+10+13+12+11=14+14+21+20+19+18+17+16+15=22+22=23+23=24+24=25+25=26+26=27+27+28=29+29=30+30+32+31=33+33=34+34=35+35=36+36+37=38+38+39=40+40+43+42+41=44+44+46+45=47+47+48=49+49+53+52+51+50=54+54+55=56+56=57+57+58=59+59+60=61+61+62=63+63=64+64=65+65+66=67+67+69+68=70+70=71+71...
result:
ok 2011371 / 2953216 / 2960966
Test #19:
score: 0
Accepted
time: 102ms
memory: 13640kb
input:
100000 1 1 1 1 1 1 1 1 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 32 33 33 33 33 33 33 39 40 40 42 42 42 42 42 42 42 49 50 50 50 50 50 50 56 57 58 59 59 59 59 59 64 65 65 65 65 69 69 69 69 69 69 69 69 69 69 69 80 80 82 82 82 82 82 82 88 89 89 89 89 89 89 95 95 95 95 99 99 99 99 99 99 105 105 105 ...
output:
=1+1+8+7+6+5+4+3+2=9+9+31+30+29+28+27+26+25+24+23+22+21+20+19+18+17+16+15+14+13+12+11+10=32+32=33+33+38+37+36+35+34=39+39=40+40+41=42+42+48+47+46+45+44+43=49+49=50+50+55+54+53+52+51=56+56=57+57=58+58=59+59+63+62+61+60=64+64=65+65+68+67+66=69+69+79+78+77+76+75+74+73+72+71+70=80+80+81=82+82+87+86+85+8...
result:
ok 1998871 / 1802271 / 1933198
Test #20:
score: 0
Accepted
time: 132ms
memory: 16052kb
input:
100000 1 1 3 3 3 3 3 3 3 3 3 3 3 14 14 14 14 14 14 20 20 20 20 24 25 26 26 26 26 26 26 26 26 26 35 35 37 37 37 37 37 37 37 37 37 46 47 47 47 47 47 52 53 53 53 53 53 53 53 53 61 61 63 63 63 63 63 68 68 70 71 71 71 71 71 76 77 78 79 79 81 81 81 81 85 86 87 87 87 87 87 87 87 87 87 96 97 97 97 97 97 102...
output:
=1+1+2=3+3+13+12+11+10+9+8+7+6+5+4=14+14+19+18+17+16+15=20+20+23+22+21=24+24=25+25=26+26+34+33+32+31+30+29+28+27=35+35+36=37+37+45+44+43+42+41+40+39+38=46+46=47+47+51+50+49+48=52+52=53+53+60+59+58+57+56+55+54=61+61+62=63+63+67+66+65+64=68+68+69=70+70=71+71+75+74+73+72=76+76=77+77=78+78=79+79+80=81+8...
result:
ok 2178409 / 2415162 / 2658777
Test #21:
score: 0
Accepted
time: 135ms
memory: 16864kb
input:
100000 1 1 3 3 5 5 5 5 9 9 9 12 12 12 15 15 15 15 19 19 19 19 19 24 25 25 25 25 25 30 31 31 33 33 35 35 37 37 39 39 39 39 43 44 44 44 47 48 48 50 50 50 53 53 53 53 57 57 57 60 60 62 62 62 62 62 62 62 62 62 62 62 62 74 74 74 74 74 74 74 74 74 83 84 84 84 84 84 89 90 91 91 91 94 95 96 96 98 99 99 101 ...
output:
=1+1+2=3+3+4=5+5+8+7+6=9+9+11+10=12+12+14+13=15+15+18+17+16=19+19+23+22+21+20=24+24=25+25+29+28+27+26=30+30=31+31+32=33+33+34=35+35+36=37+37+38=39+39+42+41+40=43+43=44+44+46+45=47+47=48+48+49=50+50+52+51=53+53+56+55+54=57+57+59+58=60+60+61=62+62+73+72+71+70+69+68+67+66+65+64+63=74+74+82+81+80+79+78+...
result:
ok 2812188 / 2861346 / 2914779
Test #22:
score: 0
Accepted
time: 140ms
memory: 16584kb
input:
100000 1 1 3 3 3 3 3 3 3 10 10 10 10 10 10 16 17 17 17 20 21 21 23 23 23 23 23 23 23 30 31 32 32 34 34 36 36 38 38 38 41 42 43 43 45 45 45 48 48 48 48 52 52 54 55 55 55 55 59 59 61 62 62 62 65 66 66 66 66 66 71 72 72 74 74 76 77 78 79 80 81 81 83 83 85 86 86 86 86 86 91 92 93 93 95 95 95 95 95 100 1...
output:
=1+1+2=3+3+9+8+7+6+5+4=10+10+15+14+13+12+11=16+16=17+17+19+18=20+20=21+21+22=23+23+29+28+27+26+25+24=30+30=31+31=32+32+33=34+34+35=36+36+37=38+38+40+39=41+41=42+42=43+43+44=45+45+47+46=48+48+51+50+49=52+52+53=54+54=55+55+58+57+56=59+59+60=61+61=62+62+64+63=65+65=66+66+70+69+68+67=71+71=72+72+73=74+7...
result:
ok 2936733 / 2943349 / 2950080
Test #23:
score: 0
Accepted
time: 171ms
memory: 16868kb
input:
100000 1 1 3 3 3 3 3 8 8 10 11 12 12 14 14 14 14 14 14 20 21 21 21 21 25 25 25 25 25 30 30 30 30 30 35 35 35 38 38 38 38 42 42 42 45 46 46 46 46 50 50 50 53 53 53 53 53 53 53 53 53 62 63 63 63 63 67 67 67 70 70 70 73 74 75 76 77 78 79 80 81 81 81 80 85 85 85 80 89 89 89 92 79 94 95 95 95 94 99 99 99...
output:
=1+1+2=3+3+7+6+5+4=8+8+9=10+10=11+11=12+12+13=14+14+19+18+17+16+15=20+20=21+21+24+23+22=25+25+29+28+27+26=30+30+34+33+32+31=35+35+37+36=38+38+41+40+39=42+42+44+43=45+45=46+46+49+48+47=50+50+66687+66696+66699+88901+88905+96302+96303+98768+99589+99864+99955+99986+99995+99998+99999+100000+99997+99996+9...
result:
ok 2953190 / 2950354 / 2951332
Test #24:
score: 0
Accepted
time: 148ms
memory: 16844kb
input:
100000 1 1 1 4 4 6 6 8 9 9 11 12 13 14 15 16 17 18 19 19 19 18 23 23 23 18 27 27 27 30 17 32 33 33 33 32 37 37 37 32 41 41 41 44 17 46 47 47 47 50 46 52 52 52 55 46 57 57 57 60 16 62 63 64 64 64 63 68 68 68 63 72 72 72 75 62 77 78 78 78 77 82 82 82 77 86 86 86 89 62 91 92 92 92 95 91 97 97 97 100 91...
output:
=1+1+3+2=4+4+5=6+6+7=8+8+66669+66671+88890+96297+98766+99589+99864+99955+99986+99995+99998+99999+100000+99997+99996+99991+99994+99993+99992+99987+99990+99989+99988+99971+99980+99983+99984+99985+99982+99981+99976+99979+99978+99977+99972+99975+99974+99973+99956+99965+99968+99969+99970+99967+99966+9996...
result:
ok 2951436 / 2951233 / 2958105
Test #25:
score: 0
Accepted
time: 138ms
memory: 16784kb
input:
100000 1 2 3 4 5 5 5 8 8 8 8 12 12 14 15 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 34 36 33 38 38 32 41 42 41 44 31 46 47 48 47 50 46 52 52 54 30 56 57 58 58 60 57 62 62 64 56 66 67 67 66 70 70 29 73 74 75 76 76 78 75 80 80 82 74 84 85 85 84 88 73 90 91 92 91 94 90 96 96 98 28 100 101...
output:
=1+1=2+2=3+3=4+4=5+5+7+6=8+8+61804+61806+85410+94427+97872+99188+99690+99882+99955+99983+99994+99998+100000+99999+99995+99997+99996+99984+99990+99992+99993+99991+99985+99988+99989+99986+99987+99956+99973+99979+99981+99982+99980+99974+99977+99978+99975+99976+99957+99967+99971+99972+99968+99970+99969+...
result:
ok 2960938 / 2961814 / 2961259
Test #26:
score: 0
Accepted
time: 147ms
memory: 16828kb
input:
100000 1 2 3 3 5 5 5 8 8 8 8 8 8 8 8 16 17 18 18 18 18 18 23 23 23 23 27 27 27 30 31 31 33 34 35 35 35 35 35 35 35 35 43 44 44 44 44 44 44 50 51 51 53 53 53 53 53 58 58 58 58 62 62 64 65 65 65 68 69 70 70 70 70 70 70 70 77 77 77 80 81 81 81 81 81 81 81 88 88 90 91 91 91 94 94 96 97 97 97 100 100 100...
output:
=1+1=2+2=3+3+4=5+5+7+6=8+8+15+14+13+12+11+10+9=16+16=17+17=18+18+22+21+20+19=23+23+26+25+24=27+27+29+28=30+30=31+31+32=33+33=34+34=35+35+42+41+40+39+38+37+36=43+43=44+44+49+48+47+46+45=50+50+61820+61821+61822+61827+61828+61832+61836+61838+85424+85429+85430+94437+97876+99189+99691+99882+99955+99983+9...
result:
ok 2957294 / 2955977 / 2952299
Test #27:
score: 0
Accepted
time: 147ms
memory: 16792kb
input:
100000 1 2 2 2 2 2 7 7 7 10 10 12 12 12 15 15 17 17 17 17 21 21 21 21 25 26 26 26 26 26 26 32 33 33 35 35 37 38 38 40 40 40 40 44 44 44 44 44 44 44 51 51 53 53 53 53 53 53 53 60 61 61 61 61 65 65 67 68 69 70 71 71 71 71 75 76 76 78 78 78 78 82 82 84 84 84 87 88 89 89 89 89 93 93 93 96 97 97 97 97 10...
output:
=1+1=2+2+6+5+4+3=7+7+9+8=10+10+11=12+12+14+13=15+15+16=17+17+20+19+18=21+21+24+23+22=25+25=26+26+31+30+29+28+27=32+32=33+33+34=35+35+36=37+37=38+38+39=40+40+43+42+41=44+44+50+49+48+47+46+45=51+51+52=53+53+59+58+57+56+55+54=60+60=61+61+64+63+62=65+65+66=67+67=68+68=69+69=70+70=71+71+74+73+72=75+75=76...
result:
ok 2935646 / 2909428 / 2818653
Test #28:
score: 0
Accepted
time: 130ms
memory: 16480kb
input:
100000 1 2 2 2 2 6 6 8 9 9 9 9 13 14 15 15 15 15 15 20 20 20 23 23 23 23 27 27 27 30 30 30 33 34 34 36 37 38 38 40 41 42 43 43 43 43 43 43 43 43 51 52 52 52 52 56 56 56 56 56 56 56 56 64 64 64 67 67 69 69 69 69 69 69 75 75 75 75 79 79 79 82 82 84 85 85 85 88 88 88 88 92 92 92 95 95 95 98 99 99 99 99...
output:
=1+1=2+2+5+4+3=6+6+7=8+8=9+9+12+11+10=13+13=14+14=15+15+19+18+17+16=20+20+22+21=23+23+26+25+24=27+27+29+28=30+30+32+31=33+33=34+34+35=36+36=37+37=38+38+39=40+40=41+41=42+42=43+43+50+49+48+47+46+45+44=51+51=52+52+55+54+53=56+56+63+62+61+60+59+58+57=64+64+66+65=67+67+68=69+69+74+73+72+71+70=75+75+78+7...
result:
ok 2697428 / 2501078 / 2248080
Test #29:
score: 0
Accepted
time: 107ms
memory: 14108kb
input:
100000 1 1 1 1 1 1 1 8 9 9 11 12 13 14 14 14 14 14 19 20 20 20 23 23 23 23 27 28 29 29 29 32 33 33 35 36 37 38 38 38 38 42 42 42 42 46 47 48 48 50 51 52 52 54 54 56 57 57 57 60 60 62 62 62 62 62 62 68 68 68 68 72 73 73 73 76 76 76 76 80 81 81 81 84 85 86 86 88 88 90 90 90 93 93 95 96 96 96 96 96 96 ...
output:
=1+1+7+6+5+4+3+2=8+8=9+9+10=11+11=12+12=13+13=14+14+18+17+16+15=19+19=20+20+22+21=23+23+26+25+24=27+27=28+28=29+29+31+30=32+32=33+33+34=35+35=36+36=37+37=38+38+41+40+39=42+42+45+44+43=46+46=47+47=48+48+49=50+50=51+51=52+52+53=54+54+55=56+56=57+57+59+58=60+60+61=62+62+67+66+65+64+63=68+68+71+70+69=72...
result:
ok 2048287 / 1862696 / 1777124
Test #30:
score: 0
Accepted
time: 140ms
memory: 16852kb
input:
100000 1 2 3 1 5 6 5 8 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 29 30 31 32 33 34 35 36 37 38 39 40 41 29 43 44 45 46 47 48 49 43 51 52 53 51 55 56 55 58 58 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 1 77 78 79 80 81 82 83 84 77 86 87 88 89 86 91 92 91 94 94 96 96 98 99 100 101...
output:
=1+1+24981+37471+43717+46840+48402+49184+49575+49771+49870+49920+49945+49958+49965+49969+49972+49974+49975+49976+49977+49978+49979+49980+49981+49982+49983+49984+49985+49986+49973+49970+49971+49966+49967+49968+49959+49960+49961+49962+49963+49964+49946+49947+49948+49949+49950+49951+49952+49953+49954+4...
result:
ok 2892439 / 2867962 / 2881246
Test #31:
score: 0
Accepted
time: 133ms
memory: 17136kb
input:
100000 1 1 3 3 5 1 7 7 9 7 11 11 13 13 1 16 17 16 19 19 21 21 16 24 24 26 27 24 29 30 29 32 32 34 1 36 37 36 39 39 41 36 43 43 45 43 47 48 47 50 50 52 36 54 54 56 54 58 58 60 60 54 63 63 65 66 63 68 69 68 71 71 73 73 75 76 1 78 79 78 81 81 83 78 85 85 87 85 89 89 91 91 93 78 95 95 97 95 99 99 101 10...
output:
=1+1+24811+37216+43419+46521+48073+48849+49238+49433+49531+49580+49605+49618+49625+49629+49632+49634+49635+49636+49637+49638+49639+49640+49641+49642+49643+49644+49645+49646+49647+49648+49649+49650+49651+49652+49653+49654+49655+49656+49657+49658+49659+49660+49661+49662+49663+49664+49665+49666+49667+4...
result:
ok 2916602 / 2873253 / 2812948
Test #32:
score: 0
Accepted
time: 130ms
memory: 16820kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 1 15 16 17 18 19 20 15 22 23 24 22 26 27 26 29 29 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 1 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 65 97 98 99 100 101...
output:
=1+1+23245+34868+40680+43586+45040+45767+46131+46314+46406+46452+46476+46488+46495+46499+46501+46503+46504+46505+46506+46507+46508+46509+46510+46511+46512+46513+46514+46515+46516+46517+46518+46519+46520+46521+46522+46523+46524+46525+46526+46527+46528+46529+46530+46531+46532+46533+46534+46535+46536+4...
result:
ok 2724781 / 2537427 / 2892977
Test #33:
score: 0
Accepted
time: 155ms
memory: 16824kb
input:
100000 1 1 3 3 5 5 5 5 9 9 9 9 13 14 14 16 16 16 19 19 21 21 23 24 25 26 26 26 26 26 26 26 33 34 34 34 34 34 34 40 41 41 41 44 45 45 45 45 49 49 49 52 52 52 55 56 56 58 58 58 58 58 63 64 64 64 67 68 68 70 70 72 73 74 72 72 77 72 79 80 80 80 70 70 85 85 87 85 85 90 85 85 93 93 93 70 70 98 99 100 100 ...
output:
=1+1+2=3+3+4=5+5+8+7+6=9+9+12+11+10=13+13=14+14+15=16+16+18+17=19+19+66680+66683+66684+66687+88899+88906+96303+96306+96309+96310+98774+98775+98776+99593+99595+99597+99866+99869+99958+99988+99997+99998+99999+100000+99993+99994+99996+99995+99989+99990+99992+99991+99987+99973+99974+99984+99985+99986+99...
result:
ok 2888394 / 2861400 / 2831358
Test #34:
score: 0
Accepted
time: 142ms
memory: 16472kb
input:
100000 1 1 3 3 3 3 3 8 8 8 11 12 13 13 13 13 13 13 13 13 13 13 13 13 13 26 26 28 29 29 29 29 29 29 29 36 36 36 39 40 40 40 40 40 45 46 46 46 49 49 51 52 53 54 55 56 56 56 56 56 56 62 62 62 62 62 62 68 68 68 68 72 72 74 75 75 75 75 79 79 79 82 83 84 84 86 87 88 88 88 88 92 92 92 92 96 97 97 97 97 97 ...
output:
=1+1+2=3+3+7+6+5+4=8+8+10+9=11+11=12+12=13+13+25+24+23+22+21+20+19+18+17+16+15+14=26+26+27=28+28=29+29+35+34+33+32+31+30=36+36+38+37=39+39=40+40+44+43+42+41=45+45=46+46+48+47=49+49+50=51+51=52+52=53+53=54+54=55+55=56+56+61+60+59+58+57=62+62+67+66+65+64+63=68+68+71+70+69=72+72+73=74+74=75+75+78+77+76...
result:
ok 2757256 / 2670678 / 2507488
Test #35:
score: 0
Accepted
time: 131ms
memory: 15908kb
input:
100000 1 1 1 1 1 6 6 8 8 8 11 12 12 14 14 14 14 18 19 19 19 19 19 19 19 26 27 27 29 29 29 29 29 29 29 29 29 38 38 38 41 41 41 41 45 45 47 47 47 47 47 47 53 54 54 54 54 54 54 54 54 54 54 54 54 54 67 67 69 70 70 70 70 70 70 70 70 70 70 70 70 70 83 83 85 86 87 87 89 89 91 92 92 92 92 92 92 92 99 99 99 ...
output:
=1+1+5+4+3+2=6+6+7=8+8+10+9=11+11=12+12+13=14+14+17+16+15=18+18=19+19+25+24+23+22+21+20=26+26=27+27+28=29+29+37+36+35+34+33+32+31+30=38+38+40+39=41+41+44+43+42=45+45+46=47+47+52+51+50+49+48=53+53=54+54+66+65+64+63+62+61+60+59+58+57+56+55=67+67+68=69+69=70+70+82+81+80+79+78+77+76+75+74+73+72+71=83+83...
result:
ok 2270490 / 2157873 / 2384197
Test #36:
score: 0
Accepted
time: 141ms
memory: 16544kb
input:
100000 1 1 1 1 1 1 1 1 9 10 10 12 12 14 14 16 16 16 16 16 21 21 23 24 25 25 25 25 29 29 31 31 31 34 35 36 36 36 39 39 41 41 43 43 43 46 46 48 49 49 49 49 53 53 53 56 56 58 59 59 59 59 59 59 59 59 59 59 69 69 69 72 73 73 73 73 77 78 79 79 79 79 79 79 79 86 87 87 89 89 89 92 93 93 95 95 95 98 99 99 99...
output:
=1+1+8+7+6+5+4+3+2=9+9=10+10+11=12+12+13=14+14+15=16+16+20+19+18+17=21+21+22=23+23=24+24=25+25+28+27+26=29+29+30=31+31+33+32=34+34=35+35=36+36+38+37=39+39+40=41+41+42=43+43+45+44=46+46+47=48+48=49+49+52+51+50=53+53+55+54=56+56+57=58+58=59+59+68+67+66+65+64+63+62+61+60=69+69+71+70=72+72=73+73+76+75+7...
result:
ok 2390832 / 2568486 / 2702956
Test #37:
score: 0
Accepted
time: 159ms
memory: 16656kb
input:
100000 1 2 2 2 2 6 6 8 8 8 8 8 8 8 8 8 8 8 19 20 20 20 23 23 23 23 23 28 28 28 31 31 31 31 35 36 36 36 36 36 41 41 41 44 44 46 46 46 49 49 49 49 49 49 49 56 56 56 56 56 61 61 61 61 65 65 65 68 69 69 69 72 73 74 74 76 76 76 76 80 80 80 80 84 84 84 84 84 84 90 91 91 91 91 95 96 96 96 96 96 101 101 101...
output:
=1+1=2+2+5+4+3=6+6+7=8+8+18+17+16+15+14+13+12+11+10+9=19+19=20+20+22+21=23+23+27+26+25+24=28+28+30+29=31+31+34+33+32=35+35=36+36+40+39+38+37=41+41+43+42=44+44+45=46+46+48+47=49+49+55+54+53+52+51+50=56+56+60+59+58+57=61+61+64+63+62=65+65+67+66=68+68=69+69+71+70=72+72=73+73=74+74+75=76+76+79+78+77=80+...
result:
ok 2782658 / 2839603 / 2864468
Test #38:
score: 0
Accepted
time: 148ms
memory: 16796kb
input:
100000 1 1 3 3 5 5 7 7 9 10 11 11 13 13 13 16 16 18 19 19 21 21 23 23 23 23 23 23 29 30 30 30 30 30 35 35 35 38 39 39 39 42 42 44 45 46 46 46 46 50 50 52 52 52 52 56 57 58 59 60 61 61 61 64 65 65 65 65 69 70 71 71 73 74 74 74 74 78 78 78 81 82 83 83 85 86 86 86 89 89 89 92 92 92 95 95 95 98 99 100 1...
output:
=1+1+2=3+3+4=5+5+6=7+7+8=9+9=10+10=11+11+61810+61813+85418+85419+94432+94433+94436+97875+97876+97879+99191+99192+99193+99692+99695+99886+99959+99985+99986+99996+100000+99999+99998+99997+99995+99988+99993+99994+99992+99989+99990+99991+99987+99961+99977+99982+99983+99984+99979+99981+99980+99978+99976+...
result:
ok 2878640 / 2949104 / 2943900
Test #39:
score: 0
Accepted
time: 138ms
memory: 16632kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 17 17 19 19 21 22 23 24 13 26 27 28 29 30 31 26 33 34 35 33 37 38 37 40 40 42 43 44 45 12 47 48 49 50 51 48 53 54 53 56 56 58 58 60 61 62 63 47 65 66 66 68 69 70 71 72 73 65 75 76 77 78 75 80 81 80 83 83 85 85 87 88 89 90 91 11 93 94 95 96 97 95 99 100 9...
output:
=1+1=2+2+3+24969+37453+43695+46817+48378+49159+49550+49746+49845+49895+49920+49933+49940+49944+49947+49949+49950+49951+49952+49953+49954+49955+49956+49957+49958+49959+49960+49961+49962+49963+49964+49965+49966+49967+49968+49969+49970+49971+49972+49973+49974+49975+49976+49948+49945+49946+49941+49942+4...
result:
ok 2938056 / 2929580 / 2902698
Test #40:
score: 0
Accepted
time: 128ms
memory: 16368kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 13 16 16 18 18 20 21 22 23 24 25 26 12 28 29 30 31 32 33 34 35 28 37 38 39 40 37 42 43 42 45 45 47 48 49 50 51 52 53 54 55 56 57 58 11 60 61 62 63 64 65 61 67 68 69 67 71 71 73 73 75 76 77 78 79 80 81 82 83 60 85 86 86 88 89 90 91 92 93 94 95 96 85 98 99 100 1...
output:
=1+1=2+2+3+24412+36617+42720+45772+47299+48063+48445+48637+48733+48782+48807+48820+48827+48831+48833+48835+48836+48837+48838+48839+48840+48841+48842+48843+48844+48845+48846+48847+48848+48849+48850+48851+48852+48853+48854+48855+48856+48857+48858+48859+48860+48861+48862+48863+48864+48865+48866+48867+4...
result:
ok 2858980 / 2853792 / 2847499
Test #41:
score: 0
Accepted
time: 119ms
memory: 16360kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 13 15 15 17 18 19 20 21 22 23 24 12 26 27 28 29 30 31 26 33 34 35 33 37 38 37 40 40 42 43 44 45 46 47 48 49 50 51 52 53 11 55 56 57 58 59 56 61 62 61 64 64 66 66 68 69 70 71 72 73 74 75 76 55 78 79 79 81 82 83 84 85 86 87 88 78 90 91 92 93 94 90 96 97 98 96 100 1...
output:
=1+1=2+2+3+24269+36403+42470+45504+47022+47781+48161+48352+48448+48496+48521+48534+48541+48545+48547+48549+48550+48551+48552+48553+48554+48555+48556+48557+48558+48559+48560+48561+48562+48563+48564+48565+48566+48567+48568+48569+48570+48571+48572+48573+48574+48575+48576+48577+48578+48579+48580+48581+4...
result:
ok 2847499 / 2835577 / 2829031
Test #42:
score: 0
Accepted
time: 155ms
memory: 16276kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 12 22 23 24 25 22 27 28 27 30 30 32 32 34 35 36 37 38 39 40 41 42 43 44 45 11 47 48 49 50 48 52 52 54 54 56 57 58 59 60 61 62 63 64 47 66 67 68 69 70 71 72 73 74 66 76 77 78 79 76 81 82 81 84 84 86 86 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
output:
=1+1=2+2+3+23986+35978+41974+44973+46473+47223+47599+47787+47882+47930+47954+47967+47974+47978+47980+47982+47983+47984+47985+47986+47987+47988+47989+47990+47991+47992+47993+47994+47995+47996+47997+47998+47999+48000+48001+48002+48003+48004+48005+48006+48007+48008+48009+48010+48011+48012+48013+48014+4...
result:
ok 2819548 / 2804697 / 2794937
Test #43:
score: 0
Accepted
time: 128ms
memory: 16220kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 18 19 20 18 22 22 24 24 26 27 28 29 30 31 32 33 34 35 36 37 11 39 40 40 42 43 44 45 46 47 48 49 50 51 39 53 54 55 56 57 58 59 53 61 62 63 61 65 66 65 68 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 10 93 94 95 96 97 98 99 100 1...
output:
=1+1=2+2+3+23592+35387+41285+44234+45709+46447+46817+47002+47095+47142+47166+47179+47186+47190+47192+47194+47195+47196+47197+47198+47199+47200+47201+47202+47203+47204+47205+47206+47207+47208+47209+47210+47211+47212+47213+47214+47215+47216+47217+47218+47219+47220+47221+47222+47223+47224+47225+47226+4...
result:
ok 2785163 / 2767577 / 2757828
Test #44:
score: 0
Accepted
time: 157ms
memory: 16832kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 14 17 17 19 19 13 22 23 23 25 22 27 28 27 30 30 32 32 34 12 36 37 38 38 37 41 42 41 44 44 46 36 48 49 50 49 52 52 48 55 56 56 55 59 59 61 61 63 64 65 66 67 11 69 70 71 72 72 71 75 76 75 78 78 80 70 82 83 83 85 85 82 88 89 89 88 92 92 94 94 96 97 69 99 100 1...
output:
=1+1=2+2+3+24426+36638+42745+45799+47326+48090+48473+48665+48761+48810+48835+48848+48855+48859+48861+48863+48864+48865+48866+48867+48868+48869+48870+48871+48872+48873+48874+48875+48876+48877+48878+48879+48880+48881+48882+48883+48884+48885+48886+48887+48888+48889+48890+48891+48892+48893+48894+48895+4...
result:
ok 2896766 / 2893889 / 2883778
Test #45:
score: 0
Accepted
time: 125ms
memory: 16880kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 16 16 18 13 20 21 21 20 24 25 24 27 27 29 30 12 32 33 34 34 33 37 37 39 39 41 32 43 44 44 46 46 43 49 50 49 52 52 54 54 56 57 58 59 60 11 62 63 64 65 65 64 68 68 70 70 63 73 74 74 76 73 78 79 78 81 81 83 83 85 86 62 88 89 90 90 92 89 94 95 94 97 97 99 88 10...
output:
=1+1=2+2+3+24198+36296+42346+45371+46884+47641+48020+48210+48306+48354+48379+48392+48399+48403+48405+48407+48408+48409+48410+48411+48412+48413+48414+48415+48416+48417+48418+48419+48420+48421+48422+48423+48424+48425+48426+48427+48428+48429+48430+48431+48432+48433+48434+48435+48436+48437+48438+48439+4...
result:
ok 2874506 / 2863285 / 2854452
Test #46:
score: 0
Accepted
time: 164ms
memory: 16800kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 16 16 13 19 20 19 22 22 24 24 26 12 28 29 30 29 32 32 34 28 36 37 37 39 36 41 42 41 44 44 46 47 48 49 50 51 11 53 54 55 56 55 58 58 60 54 62 63 64 62 66 67 66 69 69 71 72 73 53 75 76 77 78 76 80 80 82 82 84 75 86 87 87 89 89 86 92 93 94 92 96 96 98 98 100 1...
output:
=1+1=2+2+3+23882+35822+41792+44778+46271+47018+47392+47580+47674+47722+47746+47759+47766+47770+47772+47774+47775+47776+47777+47778+47779+47780+47781+47782+47783+47784+47785+47786+47787+47788+47789+47790+47791+47792+47793+47794+47795+47796+47797+47798+47799+47800+47801+47802+47803+47804+47805+47806+4...
result:
ok 2846423 / 2833342 / 2822776
Test #47:
score: 0
Accepted
time: 147ms
memory: 17500kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 13 17 17 19 19 21 22 12 24 25 25 27 28 24 30 31 32 30 34 34 36 36 38 39 40 41 42 11 44 45 46 46 48 49 45 51 52 51 54 54 56 56 58 59 44 61 62 63 62 65 65 67 68 61 70 71 71 73 70 75 76 75 78 78 80 80 82 83 84 85 86 87 88 89 90 91 92 93 94 95 10 97 98 99 100 1...
output:
=1+1=2+2+3+23443+35163+41024+43955+45421+46154+46521+46705+46798+46845+46869+46881+46888+46892+46894+46896+46897+46898+46899+46900+46901+46902+46903+46904+46905+46906+46907+46908+46909+46910+46911+46912+46913+46914+46915+46916+46917+46918+46919+46920+46921+46922+46923+46924+46925+46926+46927+46928+4...
result:
ok 2801566 / 2933119 / 2947598
Test #48:
score: 0
Accepted
time: 165ms
memory: 16944kb
input:
100000 1 1 3 4 5 1 7 8 9 7 11 11 13 13 15 1 17 18 17 20 20 22 23 17 25 25 27 28 25 30 31 30 33 33 35 36 1 38 39 38 41 41 43 44 38 46 47 48 46 50 51 50 53 53 55 38 57 58 59 57 61 61 63 63 65 57 67 67 69 70 67 72 73 72 75 75 77 77 79 80 1 82 82 84 84 86 87 82 89 90 91 89 93 94 93 96 96 98 82 100 101 1...
output:
=1+1+24879+37318+43538+46649+48205+48983+49373+49568+49666+49716+49741+49754+49761+49765+49768+49770+49771+49772+49773+49774+49775+49776+49777+49778+49779+49780+49781+49782+49783+49784+49785+49786+49787+49788+49789+49790+49791+49792+49793+49794+49795+49796+49797+49798+49799+49800+49801+49802+49803+4...
result:
ok 2937485 / 2933101 / 2841659
Test #49:
score: 0
Accepted
time: 130ms
memory: 16848kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 23 23 22 28 22 30 21 32 33 32 32 21 37 20 39 40 40 42 39 44 39 20 47 47 19 50 51 52 52 54 51 56 51 50 59 59 61 50 19 64 64 18 67 68 69 70 70 72 69 74 69 68 77 77 79 68 67 82 83 83 82 82 67 88 18 90 90 92 17 94 95 96 97 98 98 97 97...
output:
=1+1=2+2+95000+99751+99988+99999+100000+99996+99998+99997+99989+99994+99995+99993+99990+99992+99991+99911+99983+99987+99986+99984+99985+99960+99981+99982+99975+99980+99979+99976+99978+99977+99961+99974+99970+99972+99973+99971+99962+99969+99967+99968+99963+99965+99966+99964+99912+99957+99959+99958+99...
result:
ok 2945084 / 2924562 / 2686295
Test #50:
score: 0
Accepted
time: 128ms
memory: 16820kb
input:
100000 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 44 43 42 42 41 41 40 52 40 39 55 55 39 38 59 60 59 38 37 64 65 66 65 64 37 36 71 72 73 73 72 71 71 36 35 80 81 82 83 82 81 81 80 80 35 35 34 92 93 94 95 96 95 94 93 93 92...
output:
=1+1=2+2+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99...
result:
ok 2780642 / 2644236 / 1668928
Test #51:
score: 0
Accepted
time: 150ms
memory: 15868kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 14 14 14 14 14 14 14 14 13 25 25 25 25 25 25 13 13 13 13 12 36 37 37 37 37 37 37 37 36 45 45 45 36 36 36 36 12 12 12 12 12 12 11 59 60 61 61 61 61 61 61 61 60 69 69 69 60 60 60 60 60 59 78 78 78 78 78 78 78 78 78 78 78 59 59 59 59 59 59 59 11 11 11 11 11 11...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 2712327 / 2649098 / 2799886
Test #52:
score: 0
Accepted
time: 116ms
memory: 13524kb
input:
100000 1 2 3 4 5 6 7 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 2288354 / 2373354 / 2373882
Test #53:
score: 0
Accepted
time: 104ms
memory: 14000kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 11 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 59 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 2534183 / 2480437 / 2491726
Test #54:
score: 0
Accepted
time: 114ms
memory: 14296kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 11 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 49 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 97 98 98 98 98...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 2511196 / 2588218 / 2469208
Test #55:
score: 0
Accepted
time: 122ms
memory: 13656kb
input:
100000 1 2 3 4 5 6 7 8 9 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 10 87 87 87 87 87 87 87 87 87 87 87 87 87 87 87...
output:
=1+1+100000+99999+99998+99997+99996+99995+99994+99993+99992+99991+99990+99989+99988+99987+99986+99985+99984+99983+99982+99981+99980+99979+99978+99977+99976+99975+99974+99973+99972+99971+99970+99969+99968+99967+99966+99965+99964+99963+99962+99961+99960+99959+99958+99957+99956+99955+99954+99953+99952+...
result:
ok 2436516 / 2472130 / 2537639