QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#104891#4790. InheritanceDeterminantWA 240ms27252kbC++141.1kb2023-05-12 11:56:012023-05-12 11:56:03

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-12 11:56:03]
  • 评测
  • 测评结果:WA
  • 用时:240ms
  • 内存:27252kb
  • [2023-05-12 11:56:01]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;const int N=1e6+7;
int n;typedef long long ll;typedef long double ld;
ll x,minn=2e18,maxx,mn,mx,l[N],r[N],a[N],ans=2e18,a1,a2;
ll calc(ll x,ll y){return max(y-x,(x+minn-1)/minn-y/maxx);}
int main(){
	scanf("%d%lld",&n,&x);for(int i=1;i<=n;++i){
		scanf("%lld",&a[i]),minn=min(minn,a[i]),maxx=max(maxx,a[i]);
	}
	ld t=(ld)maxx/minn*(minn+1)/(maxx+1),s=0;
	for(int i=1;i<=n;++i)s+=(a[i]==minn?1:t);
	mn=(ll)((ld)x/s);mx=(ll)((ld)x/s*t);
	for(ll i=mn-2;i<=mn+2;++i)for(ll j=mx-2;j<=mx+2;++j){
		int fl=1;ll sl=0,sr=0,w=j/maxx+calc(i,j);
		for(int k=1;k<=n;++k){
			l[k]=max(j/maxx*a[k],i);r[k]=min(w*a[k],j);
			if(l[k]>r[k]){fl=0;break;}sl+=l[k];sr+=r[k];
		}
		if(!fl||x<sl||x>sr)continue;
		if(calc(i,j)<ans)ans=calc(i,j),a1=i,a2=j;
	}
	ll sl=0,sr=0,i=a1,j=a2,w=j/maxx+calc(i,j);for(int k=1;k<=n;++k){
		l[k]=max(j/maxx*a[k],i);r[k]=min(w*a[k],j);
		sl+=l[k];sr+=r[k];
	}
	printf("%lld\n",ans);ll u=x-sl;
	for(int k=1;k<=n;++k){
		if(u>=r[k]-l[k])printf("%lld ",r[k]),u-=r[k]-l[k];
		else printf("%lld ",l[k]+u),u=0;
	}
}

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3592kb

input:

2 100
1 2


output:

15
43 57 

result:

ok DIFF = 15

Test #2:

score: 0
Accepted
time: 2ms
memory: 3800kb

input:

4 32
1 1 1 2

output:

3
8 7 7 10 

result:

ok DIFF = 3

Test #3:

score: 0
Accepted
time: 97ms
memory: 15320kb

input:

491927 67199072384368320
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

68296850908
68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 68319254336 ...

result:

ok DIFF = 68296850908

Test #4:

score: 0
Accepted
time: 172ms
memory: 27016kb

input:

1000000 956381657185558551
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

output:

478109052817
478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 478300334694 4...

result:

ok DIFF = 478109052817

Test #5:

score: 0
Accepted
time: 203ms
memory: 27024kb

input:

1000000 967973470209119883
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

483906145372
484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 484099746550 4...

result:

ok DIFF = 483906145372

Test #6:

score: 0
Accepted
time: 124ms
memory: 18980kb

input:

646667 421636213428805519
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 ...

output:

325967175994
326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 326107739674 3...

result:

ok DIFF = 325967175994

Test #7:

score: 0
Accepted
time: 211ms
memory: 24864kb

input:

907879 621227555425202682
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

342077797654
342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 342284929229 3...

result:

ok DIFF = 342077797654

Test #8:

score: 0
Accepted
time: 200ms
memory: 21044kb

input:

742683 762786867292917314
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

513470722903
513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 513725042230 5...

result:

ok DIFF = 513470722903

Test #9:

score: 0
Accepted
time: 83ms
memory: 13604kb

input:

427251 941404800039035759
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 ...

output:

1101625519757
1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 1101939373181 110193...

result:

ok DIFF = 1101625519757

Test #10:

score: 0
Accepted
time: 91ms
memory: 14208kb

input:

450348 970170566614213645
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 ...

output:

1077059885683
1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 1077383327090 107738...

result:

ok DIFF = 1077059885683

Test #11:

score: 0
Accepted
time: 43ms
memory: 10240kb

input:

283949 933891390698679315
1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 ...

output:

1644387023114
1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 1644698342126 164469...

result:

ok DIFF = 1644387023114

Test #12:

score: 0
Accepted
time: 111ms
memory: 16948kb

input:

563401 804312879460406049
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

713738921095
714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 714007092773 7...

result:

ok DIFF = 713738921095

Test #13:

score: 0
Accepted
time: 56ms
memory: 10488kb

input:

292900 586643863223202795
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 ...

output:

1001407706979
1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 1001603275323 100160...

result:

ok DIFF = 1001407706979

Test #14:

score: 0
Accepted
time: 28ms
memory: 6640kb

input:

129332 813312885867118358
1 1 1 1 2 2 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 5 6 7 7 8 8 8 8 9 9 9 9 9 9 10 10 11 11 11 11 11 11 12 12 12 12 12 12 13 13 13 13 14 14 14 14 14 14 14 15 15 15 15 15 16 16 16 17 17 17 17 17 17 17 17 17 17 18 18 18 18 18 18 18 18 18 18 19 19 19 19 19 19 19 19 19 19 1...

output:

3144196329892
3144467439728 3144467439728 3144467439728 3144467439728 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 6288663769620 628866...

result:

ok DIFF = 3144196329892

Test #15:

score: 0
Accepted
time: 159ms
memory: 22896kb

input:

824858 563233273903388008
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

341366359105
341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 341554181035 3...

result:

ok DIFF = 341366359105

Test #16:

score: 0
Accepted
time: 40ms
memory: 8772kb

input:

211841 108166572343333517
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 10 1...

output:

255289313008
255325370820 255325370820 255325370820 255325370820 255325370820 255325370820 255325370820 255325370820 255325370820 255325370820 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 510614683827 5...

result:

ok DIFF = 255289313008

Test #17:

score: 0
Accepted
time: 178ms
memory: 24328kb

input:

881621 131981408191557525
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

74840416952
74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 74884427782 ...

result:

ok DIFF = 74840416952

Test #18:

score: 0
Accepted
time: 102ms
memory: 18644kb

input:

642497 944099120475297790
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

734637008932
734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 734951763434 7...

result:

ok DIFF = 734637008932

Test #19:

score: 0
Accepted
time: 39ms
memory: 7712kb

input:

174653 307671076643765729
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 2 2 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 7 7 7 7 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 10 10 10 10 10 10 10 10 10 10 10 10 10 10 11 11 11 11 11...

output:

880795794256
880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 880898361451 1761694155706 1761694155706 1761694155706 1761694155706 1761694155706 176169415...

result:

ok DIFF = 880795794256

Test #20:

score: 0
Accepted
time: 103ms
memory: 13432kb

input:

409841 882589642849272512
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...

output:

1076661010213
1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 1076955260284 107695...

result:

ok DIFF = 1076661010213

Test #21:

score: 0
Accepted
time: 203ms
memory: 26384kb

input:

962455 271925002715012736
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

141243764593
141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 141334421694 1...

result:

ok DIFF = 141243764593

Test #22:

score: 0
Accepted
time: 188ms
memory: 24612kb

input:

898272 324797871318994180
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

180760777217
180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 180869082056 1...

result:

ok DIFF = 180760777217

Test #23:

score: 0
Accepted
time: 20ms
memory: 6052kb

input:

102530 649152619831445392
1 1 1 2 2 2 3 3 3 3 4 5 5 5 5 7 7 7 7 7 7 7 7 8 9 9 9 10 10 10 11 11 11 11 11 11 11 12 12 13 13 13 13 13 13 14 14 14 14 15 15 15 15 15 16 16 17 17 17 18 18 18 19 19 20 20 20 20 20 21 21 21 21 21 21 22 22 22 23 24 24 24 24 25 25 25 25 26 27 28 28 29 29 29 29 29 29 29 30 30 3...

output:

3165609723548
3165826116310 3165826116310 3165826116310 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 6331435839858 633143...

result:

ok DIFF = 3165609723548

Test #24:

score: 0
Accepted
time: 100ms
memory: 16660kb

input:

548232 148541949601256711
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 ...

output:

135460475433
135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 135509994890 1...

result:

ok DIFF = 135460475433

Test #25:

score: 0
Accepted
time: 142ms
memory: 18428kb

input:

624191 58263318171339819
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

46666624286
46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 46686048479 ...

result:

ok DIFF = 46666624286

Test #26:

score: 0
Accepted
time: 31ms
memory: 6592kb

input:

119340 516887884544626061
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 4 5 5 5 5 6 7 7 7 7 8 9 9 9 10 10 10 10 11 11 11 11 11 11 11 12 12 12 12 12 12 12 12 13 13 13 13 14 15 15 15 15 15 15 15 16 16 16 16 16 16 17 17 17 17 17 17 18 18 18 18 18 18 19 19 19 20 20 20 21 21 21 21 21 21 22 22 22 22...

output:

2165614956510
2165787261475 2165787261475 2165787261475 2165787261475 2165787261475 2165787261475 2165787261475 2165787261475 2165787261475 2165787261475 4331402217984 4331402217984 4331402217984 4331402217984 4331402217984 4331402217984 4331402217984 4331402217984 4331402217984 4331402217984 433140...

result:

ok DIFF = 2165614956510

Test #27:

score: 0
Accepted
time: 143ms
memory: 18716kb

input:

643303 86584912190780482
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2...

output:

67289720848
67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 67318588167 ...

result:

ok DIFF = 67289720848

Test #28:

score: 0
Accepted
time: 85ms
memory: 13760kb

input:

432799 605970561129155589
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 ...

output:

700016434999
700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 700218459944 7...

result:

ok DIFF = 700016434999

Test #29:

score: 0
Accepted
time: 118ms
memory: 18976kb

input:

659082 689709824436552298
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

523182543887
523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 523412514235 5...

result:

ok DIFF = 523182543887

Test #30:

score: 0
Accepted
time: 78ms
memory: 11756kb

input:

338351 399600463384446792
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ...

output:

590473909809
590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 590607124453 5...

result:

ok DIFF = 590473909809

Test #31:

score: 0
Accepted
time: 181ms
memory: 26616kb

input:

984983 937235491069387312
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

475683750902
475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 475996289503 4...

result:

ok DIFF = 475683750902

Test #32:

score: 0
Accepted
time: 74ms
memory: 13500kb

input:

416128 918286788932235569
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...

output:

1103285128690
1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 1103591256639 110359...

result:

ok DIFF = 1103285128690

Test #33:

score: 0
Accepted
time: 135ms
memory: 18996kb

input:

655327 933922701833178287
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

712493632186
712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 712805036745 7...

result:

ok DIFF = 712493632186

Test #34:

score: 0
Accepted
time: 55ms
memory: 10904kb

input:

309699 965698936464936264
1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 ...

output:

1559009813224
1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 1559331756396 155933...

result:

ok DIFF = 1559009813224

Test #35:

score: 0
Accepted
time: 166ms
memory: 20516kb

input:

721922 976932756187367689
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

676543147559
676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 676868878491 6...

result:

ok DIFF = 676543147559

Test #36:

score: 0
Accepted
time: 223ms
memory: 26988kb

input:

1000000 901470978195622262
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

450653495182
450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 450954031024 4...

result:

ok DIFF = 450653495182

Test #37:

score: 0
Accepted
time: 170ms
memory: 27076kb

input:

1000000 926970844871328236
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

463400645845
463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 463709682621 4...

result:

ok DIFF = 463400645845

Test #38:

score: 0
Accepted
time: 198ms
memory: 26988kb

input:

1000000 988467957250279111
100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1...

output:

9460616373
979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979010680500 979...

result:

ok DIFF = 9460616373

Test #39:

score: 0
Accepted
time: 185ms
memory: 27012kb

input:

1000000 972233612482681593
100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1...

output:

9305237007
962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962931595100 962...

result:

ok DIFF = 9305237007

Test #40:

score: 0
Accepted
time: 187ms
memory: 27092kb

input:

1000000 965400736672402642
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

521627025024
521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 521835717572 5...

result:

ok DIFF = 521627025024

Test #41:

score: 0
Accepted
time: 178ms
memory: 27172kb

input:

1000000 921238811503199871
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

497800342303
497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 497999502271 4...

result:

ok DIFF = 497800342303

Test #42:

score: 0
Accepted
time: 233ms
memory: 26984kb

input:

1000000 914915880273077987
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

output:

457378338008
457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 457561325940 4...

result:

ok DIFF = 457378338008

Test #43:

score: 0
Accepted
time: 174ms
memory: 27252kb

input:

1000000 941903866048630969
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

output:

470868335057
471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 471056720068 4...

result:

ok DIFF = 470868335057

Test #44:

score: 0
Accepted
time: 221ms
memory: 27096kb

input:

1000000 998362253508659068
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3...

output:

499131103054
499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 499259101798 4...

result:

ok DIFF = 499131103054

Test #45:

score: 0
Accepted
time: 170ms
memory: 27040kb

input:

1000000 908141119457707746
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

output:

454026872553
454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 454143304626 4...

result:

ok DIFF = 454026872553

Test #46:

score: 0
Accepted
time: 204ms
memory: 27088kb

input:

1000000 924918521175066289
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3...

output:

462415748051
462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 462532830149 4...

result:

ok DIFF = 462415748051

Test #47:

score: 0
Accepted
time: 212ms
memory: 27012kb

input:

1000000 946396043750937274
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3...

output:

473155154822
473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 473274956101 4...

result:

ok DIFF = 473155154822

Test #48:

score: 0
Accepted
time: 184ms
memory: 27024kb

input:

1000000 997639716410005875
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

645609927349
645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 645642208652 6...

result:

ok DIFF = 645609927349

Test #49:

score: 0
Accepted
time: 193ms
memory: 27012kb

input:

1000000 922671442323549605
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

596825955089
596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 596855797878 5...

result:

ok DIFF = 596825955089

Test #50:

score: 0
Accepted
time: 193ms
memory: 26960kb

input:

1000000 977388012583170882
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

632398044668
632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 632428159577 6...

result:

ok DIFF = 632398044668

Test #51:

score: 0
Accepted
time: 220ms
memory: 27040kb

input:

1000000 950801628543221368
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

615018811557
615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 615048098864 6...

result:

ok DIFF = 615018811557

Test #52:

score: 0
Accepted
time: 174ms
memory: 26984kb

input:

1000000 919549041081773954
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

595061244372
595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 595088922282 5...

result:

ok DIFF = 595061244372

Test #53:

score: 0
Accepted
time: 205ms
memory: 26988kb

input:

1000000 948527169614102443
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

613746136254
613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 613774683249 6...

result:

ok DIFF = 613746136254

Test #54:

score: 0
Accepted
time: 172ms
memory: 27016kb

input:

1000000 913382885798970599
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

606766284805
606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 606772353529 6...

result:

ok DIFF = 606766284805

Test #55:

score: 0
Accepted
time: 201ms
memory: 27080kb

input:

1000000 978855283231139064
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

650018648908
650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 650025149159 6...

result:

ok DIFF = 650018648908

Test #56:

score: 0
Accepted
time: 192ms
memory: 26940kb

input:

1000000 961535504258851807
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

639043911135
639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 639047106857 6...

result:

ok DIFF = 639043911135

Test #57:

score: 0
Accepted
time: 175ms
memory: 27016kb

input:

1000000 932379187877379616
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

620135008299
620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 620138110525 6...

result:

ok DIFF = 620135008299

Test #58:

score: 0
Accepted
time: 172ms
memory: 27012kb

input:

1000000 947756432392520082
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

630360057594
630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 630362579074 6...

result:

ok DIFF = 630360057594

Test #59:

score: 0
Accepted
time: 200ms
memory: 27252kb

input:

1000000 979115395159955213
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

651250929467
651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 651253534736 6...

result:

ok DIFF = 651250929467

Test #60:

score: 0
Accepted
time: 240ms
memory: 27172kb

input:

1000000 912454013671386195
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

608587737759
608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 608587981972 6...

result:

ok DIFF = 608587737759

Test #61:

score: 0
Accepted
time: 221ms
memory: 27016kb

input:

1000000 924894578986922922
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

616588410845
616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 616588658386 6...

result:

ok DIFF = 616588410845

Test #62:

score: 0
Accepted
time: 203ms
memory: 27040kb

input:

1000000 938470862137496431
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

625395332160
625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 625395457278 6...

result:

ok DIFF = 625395332160

Test #63:

score: 0
Accepted
time: 201ms
memory: 27020kb

input:

1000000 959297940006254106
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

639795042949
639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 639795172074 6...

result:

ok DIFF = 639795042949

Test #64:

score: -100
Wrong Answer
time: 172ms
memory: 27064kb

input:

1000000 978495448245387284
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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:

2000000000000000000
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:

wrong answer you claimed 2000000000000000000, but the expected DIFF is 652186808825