QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#126892 | #6735. Tree | csy2005 | AC ✓ | 915ms | 150320kb | C++14 | 6.2kb | 2023-07-19 09:24:55 | 2023-07-19 20:01:52 |
Judging History
answer
#include <iostream>
#include <algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<iomanip>
#include<ctime>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<bitset>
#include<cassert>
#define sqr(x) ((x)*(x))
#define fz1(i,n) for ((i)=1;(i)<=(n);(i)++)
#define fd1(i,n) for ((i)=(n);(i)>=1;(i)--)
#define fz0g(i,n) for ((i)=0;(i)<=(n);(i)++)
#define fd0g(i,n) for ((i)=(n);(i)>=0;(i)--)
#define fz0k(i,n) for ((i)=0;(i)<(n);(i)++)
#define fd0k(i,n) for ((i)=(((long long)(n))-1);(i)>=0;(i)--)
#define fz(i,x,y) for ((i)=(x);(i)<=(y);(i)++)
#define fd(i,y,x) for ((i)=(y);(i)>=(x);(i)--)
#define fzin fz1(i,n)
#define fzim fz1(i,m)
#define fzjn fz1(j,n)
#define fzjm fz1(j,m)
#define ff(c,itr) for (__typeof((c).begin()) itr=(c).begin();itr!=(c).end();++itr)
#define pb push_back
#define mk make_pair
#define rdst(st,len){static char ss[len];scanf(" %s",ss);(st)=ss;}
#define spln(i,n) (i==n?'\n':' ')
#define fac_init(n){fac[0]=fac[1]=inv[1]=fi[0]=fi[1]=1;fz(i,2,n){fac[i]=1ll*fac[i-1]*i%mod;inv[i]=1ll*(mod-mod/i)*inv[mod%i]%mod;fi[i]=1ll*fi[i-1]*inv[i]%mod;}}
using namespace std;
typedef long long i64;
typedef long double f80;
typedef unsigned int u32;
typedef unsigned long long u64;
inline void read(int &x)
{
char c;int f=1;
while(!isdigit(c=getchar()))if(c=='-')f=-1;
x=(c&15);while(isdigit(c=getchar()))x=(x<<1)+(x<<3)+(c&15);
x*=f;
}
int n,q,i,j;
struct edg{int p,w,c;};
vector<edg> bi[200005];
int fa[200005],fc[200005],fw[200005];
int bel[200005],lst[200005];
int sz[200005],tp[200005],son[200005],dep[200005];
i64 dis[200005];
int dfn[200005],ti,mp[200005];
int lg[200005],f[19][200005];
void dfs1(int x,int p)
{
fa[x]=p;sz[x]=1;
for(auto e:bi[x]){
if(e.p==p) continue;
dep[e.p]=dep[x]+1;
dis[e.p]=dis[x]+e.w;
fc[e.p]=e.c;
dfs1(e.p,x);
sz[x]+=sz[e.p];
if(sz[son[x]]<sz[e.p]) son[x]=e.p;
}
}
void dfs2(int x,int t)
{
tp[x]=t;mp[dfn[x]=++ti]=x;
f[0][ti]=dfn[fa[x]];
if(son[x]) dfs2(son[x],t);
for(auto e:bi[x]){
if(e.p==fa[x]||e.p==son[x]) continue;
dfs2(e.p,e.p);
}
}
int lca(int x,int y)
{
if(x==y) return x;
x=dfn[x];y=dfn[y];
if(x>y) swap(x,y);
int l=x+1,r=y;
int t=lg[r-l+1];
return mp[min(f[t][l],f[t][r-(1<<t)+1])];
}
int nxt(int x,int t)
{
while(dfn[fa[tp[x]]]>dfn[t]) x=fa[tp[x]];
if(fa[tp[x]]==t) return tp[x];
return mp[dfn[t]+1];
}
i64 calc(int x,int y)
{
return dis[x]+dis[y]-2*dis[lca(x,y)];
}
int tim[200005],col[200005];
vector<int> v[800005];
int vis[800005];
i64 ans[800005];
void update(int x,int l,int r,int ql,int qr,int c)
{
// if(x==1) cerr<<ql<<' '<<qr<<' '<<c<<endl;
vis[x]=1;
if(ql<=l&&r<=qr){v[x].push_back(c);return;}
int mid=(l+r)/2;
if(ql<=mid) update(x*2,l,mid,ql,qr,c);
if(qr>mid) update(x*2+1,mid+1,r,ql,qr,c);
}
struct node
{
int a,b;i64 c;
};
node operator +(node x,node y)
{
node t=x;i64 tmp;
if(y.c>t.c) t=y;
tmp=calc(x.a,y.a);if(tmp>t.c) t=(node){x.a,y.a,tmp};
tmp=calc(x.a,y.b);if(tmp>t.c) t=(node){x.a,y.b,tmp};
tmp=calc(x.b,y.a);if(tmp>t.c) t=(node){x.b,y.a,tmp};
tmp=calc(x.b,y.b);if(tmp>t.c) t=(node){x.b,y.b,tmp};
return t;
}
int *buf1[10000005],val1[10000005],tot1;
i64 *buf2[10000005],val2[10000005];int tot2;
node *buf3[1000005],val3[1000005];int tot3;
void upd(int &x,int y)
{
buf1[++tot1]=&x;val1[tot1]=x;
x=y;
}
void upd(i64 &x,i64 y)
{
buf2[++tot2]=&x;val2[tot2]=x;
x=y;
}
void upd(node &x,node y)
{
buf3[++tot3]=&x;val3[tot3]=x;
x=y;
}
int dsu[200005],dsz[200005],dtp[200005];
node fs[200005];
i64 mx[200005],sec[200005];
int mxid[200005],secid[200005];
i64 rc[200005];
int find(int x){return dsu[x]==x?x:find(dsu[x]);}
void merge(int x,int y)
{
if(dsz[x]>dsz[y]) swap(x,y);
upd(dsz[y],dsz[x]+dsz[y]);
upd(dsu[x],y);
int t=dep[dtp[x]]<dep[dtp[y]]?dtp[x]:dtp[y];
upd(fs[t],fs[dtp[x]]+fs[dtp[y]]);
int lt=nxt(dtp[x]^dtp[y]^t,t);
upd(fs[lt],fs[lt]+fs[dtp[x]^dtp[y]^t]);
upd(dtp[y],t);
}
int hv[200005];
void solve(int x,int l,int r,i64 cur)
{
if(!vis[x]) return;vis[x]=0;
int m1=tot1,m2=tot2,m3=tot3;
for(int u:v[x]){
upd(hv[u],1);
cur=max(cur,rc[u]);
int id=find(u),t=dtp[id];
i64 ori=-1;
if(fa[t]&&fc[fa[t]]==fc[t]){
int tf=find(fa[t]),tt=dtp[tf];
ori=max(dis[fs[tt].a],dis[fs[tt].b])-dis[fa[tt]];
merge(tf,id);
id=find(u);t=dtp[id];
}
if(hv[t]){
cur=max(cur,fs[t].c);
i64 len=max(dis[fs[t].a],dis[fs[t].b])-dis[fa[t]];
int b=bel[t];
if(mx[b]==ori) upd(mx[b],len);
else if(mx[b]<len) upd(sec[b],mx[b]),upd(mx[b],len);
else if(sec[b]<len) upd(sec[b],len);
if(mx[b]+sec[b]>rc[fa[t]]) upd(rc[fa[t]],mx[b]+sec[b]);
if(hv[fa[t]]) cur=max(cur,rc[fa[t]]);
}
else{
cur=max(cur,fs[nxt(u,t)].c);
}
}
v[x].clear();
ans[x]=max(ans[x],cur);
if(l<r){
int mid=(l+r)/2;
solve(x*2,l,mid,cur);
solve(x*2+1,mid+1,r,cur);
}
while(tot1>m1) *buf1[tot1]=val1[tot1],tot1--;
while(tot2>m2) *buf2[tot2]=val2[tot2],tot2--;
while(tot3>m3) *buf3[tot3]=val3[tot3],tot3--;
}
void print(int x,int l,int r)
{
if(l==r){
printf("%lld\n",ans[x]);
return;
}
ans[x+x]=max(ans[x+x],ans[x]);
ans[x+x+1]=max(ans[x+x+1],ans[x]);
int mid=(l+r)/2;
print(x+x,l,mid);print(x+x+1,mid+1,r);
}
struct rng{int id,l,r;};
vector<rng> vq[200005];
int main()
{
fz(i,2,200002) lg[i]=lg[i>>1]+1;
read(n);read(q);
fz1(i,n) read(col[i]);
fz(i,2,n) read(fa[i]);
fz(i,2,n) read(fc[i]);
fz(i,2,n) read(fw[i]);
fz(i,2,n){
bi[i].push_back((edg){fa[i],fw[i],fc[i]});
bi[fa[i]].push_back((edg){i,fw[i],fc[i]});
}
dfs1(1,0);
dfs2(1,1);
fz1(j,18)fz1(i,n-(1<<j)+1) f[j][i]=min(f[j-1][i],f[j-1][i+(1<<(j-1))]);
fz1(i,n){
for(auto e:bi[i]){
if(e.p==fa[i]) continue;
if(!lst[e.c]) lst[e.c]=e.p;
bel[e.p]=lst[e.c];
}
for(auto e:bi[i]){
if(e.p==fa[i]) continue;
lst[e.c]=0;
}
}
fz1(i,n) tim[i]=0;
fz1(i,q){
int x,c;read(x);read(c);
vq[col[x]].push_back((rng){x,tim[x],i-1});
tim[x]=i;col[x]=c;
}
fz1(i,n) vq[col[i]].push_back((rng){i,tim[i],q});
fz1(i,n) dsu[i]=dtp[i]=i,dsz[i]=1,fs[i]=(node){i,i,0};
fz1(j,n)if(!vq[j].empty()){
// cerr<<j<<":\n";
ff(vq[j],it) update(1,0,q,it->l,it->r,it->id);
solve(1,0,q,0);
}
print(1,0,q);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 4ms
memory: 59356kb
input:
5 5 5 4 3 4 5 1 2 3 1 2 2 2 2 4 9 2 6 2 5 4 5 5 4 3 5 2 1
output:
6 10 10 4 15 2
result:
ok 6 numbers
Test #2:
score: 0
Accepted
time: 4ms
memory: 57148kb
input:
13 21 1 2 1 2 4 4 2 1 4 2 3 6 1 1 1 2 3 2 6 7 8 9 10 8 8 2 13 1 1 1 2 2 1 2 1 2 1 472868230 94771637 209247951 483753517 822923242 938504499 413445582 328056598 487969741 355938152 902390974 28610378 2 4 7 4 10 1 8 4 2 3 5 2 11 4 9 3 6 2 6 1 4 1 6 1 2 3 8 2 5 2 6 2 8 4 8 2 1 4 11 4 12 2
output:
209247951 822923242 938504499 938504499 1351950081 1351950081 1351950081 1351950081 1351950081 413445582 413445582 413445582 413445582 413445582 94771637 94771637 94771637 413445582 94771637 0 0 902390974
result:
ok 22 numbers
Test #3:
score: 0
Accepted
time: 353ms
memory: 124536kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 1999164873 199...
result:
ok 200000 numbers
Test #4:
score: 0
Accepted
time: 563ms
memory: 130832kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 1999993380 199...
result:
ok 199999 numbers
Test #5:
score: 0
Accepted
time: 363ms
memory: 124316kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 1997943637 199...
result:
ok 200000 numbers
Test #6:
score: 0
Accepted
time: 650ms
memory: 137492kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 1999990769 199...
result:
ok 200001 numbers
Test #7:
score: 0
Accepted
time: 340ms
memory: 115332kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 1999694869 199...
result:
ok 200001 numbers
Test #8:
score: 0
Accepted
time: 582ms
memory: 134732kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 1999975784 199...
result:
ok 199999 numbers
Test #9:
score: 0
Accepted
time: 618ms
memory: 137384kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 1999979021 199...
result:
ok 200000 numbers
Test #10:
score: 0
Accepted
time: 335ms
memory: 119752kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 1999727070 199...
result:
ok 200001 numbers
Test #11:
score: 0
Accepted
time: 619ms
memory: 133128kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 1999998737 199...
result:
ok 199999 numbers
Test #12:
score: 0
Accepted
time: 351ms
memory: 125168kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 1998690305 199...
result:
ok 199999 numbers
Test #13:
score: 0
Accepted
time: 714ms
memory: 137680kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 10779640138 ...
result:
ok 200001 numbers
Test #14:
score: 0
Accepted
time: 647ms
memory: 134268kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 10233934986 ...
result:
ok 199999 numbers
Test #15:
score: 0
Accepted
time: 652ms
memory: 142388kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 10888368837 ...
result:
ok 200000 numbers
Test #16:
score: 0
Accepted
time: 662ms
memory: 137008kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 10145392799 ...
result:
ok 199999 numbers
Test #17:
score: 0
Accepted
time: 659ms
memory: 136480kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 12633249112 ...
result:
ok 199999 numbers
Test #18:
score: 0
Accepted
time: 700ms
memory: 136764kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 9731835557 973...
result:
ok 199999 numbers
Test #19:
score: 0
Accepted
time: 709ms
memory: 135496kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 12966559168 ...
result:
ok 200001 numbers
Test #20:
score: 0
Accepted
time: 726ms
memory: 136276kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 10903605928 ...
result:
ok 199999 numbers
Test #21:
score: 0
Accepted
time: 672ms
memory: 135348kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 12327114808 ...
result:
ok 199999 numbers
Test #22:
score: 0
Accepted
time: 707ms
memory: 136460kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 10794900302 ...
result:
ok 200001 numbers
Test #23:
score: 0
Accepted
time: 863ms
memory: 136576kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 6694759253332 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 5604670721548 560467...
result:
ok 200001 numbers
Test #24:
score: 0
Accepted
time: 835ms
memory: 139500kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8730169189068 8730169189068 8730169189068 8730169189068 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6879673837193 6498003008733 6498003008733 649800...
result:
ok 199999 numbers
Test #25:
score: 0
Accepted
time: 834ms
memory: 134228kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
16964972670721 16390048684544 16390048684544 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 9913582115275 7849037632647 7849037632647 7849037632647 784...
result:
ok 200000 numbers
Test #26:
score: 0
Accepted
time: 761ms
memory: 136388kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10119248263503 10119248263503 10119248263503 10119248263503 10119248263503 8542130343519 8542130343519 8542130343519 8542130343519 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6842138653779 6...
result:
ok 200000 numbers
Test #27:
score: 0
Accepted
time: 809ms
memory: 135904kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
16872130560892 16872130560892 16872130560892 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 15104243748166 ...
result:
ok 200001 numbers
Test #28:
score: 0
Accepted
time: 804ms
memory: 137348kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8838414514239 8838414514239 8838414514239 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 8373720423412 6995924779246 6995924779246 6995924779246 6995924779246 699592...
result:
ok 200000 numbers
Test #29:
score: 0
Accepted
time: 823ms
memory: 136628kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
7701141318718 7701141318718 7701141318718 7701141318718 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 4418870471250 441887...
result:
ok 199999 numbers
Test #30:
score: 0
Accepted
time: 882ms
memory: 139040kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
17022193248209 17022193248209 17022193248209 17022193248209 17022193248209 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 10792831394227 6123864764662 6123864764662 6123864764662 6123864764662 6123864764662 61238...
result:
ok 200000 numbers
Test #31:
score: 0
Accepted
time: 834ms
memory: 140304kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 15888329431172 11083692627808 11083692627808 11083692627808 11083692627808 11083692627808 ...
result:
ok 200001 numbers
Test #32:
score: 0
Accepted
time: 844ms
memory: 139956kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8839751622015 8839751622015 8839751622015 8839751622015 8839751622015 8839751622015 8839751622015 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 8127355953055 6876528315124 6876528315124 6876528315124 6876528315124 6876528315124 687652...
result:
ok 199999 numbers
Test #33:
score: 0
Accepted
time: 517ms
memory: 146384kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 9725472699 972...
result:
ok 200001 numbers
Test #34:
score: 0
Accepted
time: 461ms
memory: 145772kb
input:
199998 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 10876048367 ...
result:
ok 200000 numbers
Test #35:
score: 0
Accepted
time: 430ms
memory: 149180kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 4757124594 475...
result:
ok 199999 numbers
Test #36:
score: 0
Accepted
time: 533ms
memory: 149416kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 10754456505 ...
result:
ok 200000 numbers
Test #37:
score: 0
Accepted
time: 514ms
memory: 150320kb
input:
199999 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 10586909197 ...
result:
ok 200001 numbers
Test #38:
score: 0
Accepted
time: 915ms
memory: 136712kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 15202297780 ...
result:
ok 200000 numbers
Test #39:
score: 0
Accepted
time: 828ms
memory: 136904kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 14045671356 ...
result:
ok 200001 numbers
Test #40:
score: 0
Accepted
time: 896ms
memory: 138136kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 13920420868 ...
result:
ok 199999 numbers
Test #41:
score: 0
Accepted
time: 882ms
memory: 135956kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 13749433620 ...
result:
ok 200000 numbers
Test #42:
score: 0
Accepted
time: 855ms
memory: 136164kb
input:
200000 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 13903763549 ...
result:
ok 199999 numbers
Test #43:
score: 0
Accepted
time: 880ms
memory: 136856kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 13828228862 ...
result:
ok 200000 numbers
Test #44:
score: 0
Accepted
time: 439ms
memory: 133528kb
input:
199999 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 5890088235 589...
result:
ok 200000 numbers
Test #45:
score: 0
Accepted
time: 432ms
memory: 135100kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 4585029213 458...
result:
ok 200001 numbers
Test #46:
score: 0
Accepted
time: 424ms
memory: 139008kb
input:
200000 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 5828176817 582...
result:
ok 200001 numbers
Test #47:
score: 0
Accepted
time: 661ms
memory: 134436kb
input:
199998 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 10818152720 ...
result:
ok 200000 numbers
Test #48:
score: 0
Accepted
time: 667ms
memory: 136032kb
input:
200000 199999 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 11176355739 ...
result:
ok 200000 numbers
Test #49:
score: 0
Accepted
time: 461ms
memory: 135844kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 6951297596 695...
result:
ok 199999 numbers
Test #50:
score: 0
Accepted
time: 567ms
memory: 133212kb
input:
199998 200000 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 12892129784 ...
result:
ok 200001 numbers
Test #51:
score: 0
Accepted
time: 477ms
memory: 132400kb
input:
199999 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 8893665873 889...
result:
ok 199999 numbers
Test #52:
score: 0
Accepted
time: 864ms
memory: 137852kb
input:
199998 199998 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1064 1...
output:
13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 13933086708 ...
result:
ok 199999 numbers
Test #53:
score: 0
Accepted
time: 495ms
memory: 113656kb
input:
200000 199998 49441 37885 24128 648 776 55 32583 34146 15473 59281 3478 8998 15132 88193 8815 94360 22342 8413 19377 16187 38814 15720 33706 48309 1393 4424 10729 4675 4420 33459 15552 29757 32030 4361 16053 18663 22470 13941 7275 2255 8 47975 18888 38456 23806 80532 2893 1446 3890 34427 68534 32984...
output:
669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 669645996 ...
result:
ok 199999 numbers
Test #54:
score: 0
Accepted
time: 509ms
memory: 113756kb
input:
199999 199999 40518 8211 65911 33288 105868 65619 149729 113811 189467 173883 29621 110825 179103 93030 187332 14245 190242 111183 145983 140740 140034 61807 7766 78468 143624 135365 60429 62403 69629 35943 74390 120590 170604 115104 195260 45050 138351 67444 16049 79825 114806 27255 139603 49410 16...
output:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
result:
ok 200000 numbers
Test #55:
score: 0
Accepted
time: 441ms
memory: 114228kb
input:
199998 200000 229 32 1283 61 797 225 5 1812 209 48 79 1 13 754 9 15 21 15 377 330 4 212 66 40 1899 20 3 1707 789 744 7 1812 355 6 85 285 1 4 664 442 2589 90 29 1574 855 83 26 160 601 973 3 136 100 51 989 7667 1361 790 21 13 72 3 263 1354 3749 32 248 64 9 11 2932 54 125 18 11 1480 12 540 11 195 239 2...
output:
999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 999197103 ...
result:
ok 200001 numbers
Test #56:
score: 0
Accepted
time: 414ms
memory: 114216kb
input:
199999 199999 139 512 1541 6 409 3761 9 2 1607 38 1 17 64 245 1458 1 261 19 4 123 1276 870 97 1 206 142 31 6 312 4 41 92 21 376 40 2 10 946 26 16 96 4 405 1 3 21 1489 104 91 53 10 14 233 2062 3255 15 1 1939 483 81 8 6 100 283 676 30 864 58 117 19 12 84 98 11 162 1334 28 1 3 397 14 196 192 5332 23 8 ...
output:
999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 999889285 ...
result:
ok 200000 numbers
Test #57:
score: 0
Accepted
time: 495ms
memory: 126848kb
input:
200000 199998 1 2 1 1 1 2 4 1 1 2 1 1 1 1 2 4 2 1 1 3 3 1 3 1 1 2 2 1 1 1 2 1 2 2 1 1 1 1 4 3 1 3 3 3 2 1 3 2 1 1 1 4 1 2 1 2 4 2 1 1 3 2 2 1 1 1 1 1 2 2 1 1 1 2 1 4 2 1 2 1 4 1 1 3 3 3 1 4 1 3 1 2 2 1 3 1 3 1 3 2 1 2 2 2 1 1 3 1 1 2 1 3 1 1 2 2 1 4 2 2 1 1 2 1 2 2 1 3 3 3 1 3 2 1 1 1 1 3 2 1 1 3 1 ...
output:
4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 4869794433 486...
result:
ok 199999 numbers
Test #58:
score: 0
Accepted
time: 613ms
memory: 130852kb
input:
200000 199998 1 1 1 1 3 2 1 1 1 1 2 2 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 2 2 2 1 1 1 1 1 3 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 ...
output:
12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 12350643166 ...
result:
ok 199999 numbers
Test #59:
score: 0
Accepted
time: 506ms
memory: 141140kb
input:
199999 199999 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 11584589800 ...
result:
ok 200000 numbers
Test #60:
score: 0
Accepted
time: 790ms
memory: 143888kb
input:
200000 200000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:
14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 14807286806 ...
result:
ok 200001 numbers