QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#216209#59. Determinant of A+Bzzhouhuanyi30 874ms8708kbC++233.2kb2023-10-15 16:42:572023-10-15 16:42:58

Judging History

你现在查看的是测评时间为 2023-10-15 16:42:58 的历史记录

  • [2024-05-05 11:54:08]
  • hack成功,自动添加数据
  • (/hack/617)
  • [2024-05-05 11:38:15]
  • hack成功,自动添加数据
  • (/hack/616)
  • [2024-03-04 04:46:44]
  • 管理员手动重测本题所有提交记录
  • 测评结果:30
  • 用时:853ms
  • 内存:8832kb
  • [2024-03-04 04:35:40]
  • hack成功,自动添加数据
  • (/hack/552)
  • [2023-10-15 16:42:58]
  • 评测
  • 测评结果:30
  • 用时:874ms
  • 内存:8708kb
  • [2023-10-15 16:42:57]
  • 提交

answer

#include<iostream>
#include<cstdio>
#define N 500
#define mod 998244353
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
int fast_pow(int a,int b)
{
	int res=1,mul=a;
	while (b)
	{
		if (b&1) res=1ll*res*mul%mod;
		mul=1ll*mul*mul%mod,b>>=1;
	}
	return res;
}
void Adder(int &x,int d)
{
	x+=d;
	if (x>=mod) x-=mod;
	return;
}
void Adder2(int &x,int d)
{
	x+=d;
	if (x<0) x+=mod;
	return;
}
int MD(int x)
{
	return x>=mod?x-mod:x;
}
int MD2(int x)
{
	return x<0?x+mod:x;
}
int n,q,cnt,ans,res=1,F[N+1],A[N+1][N+1],B[N+1][N+1],C[N+1][N+1],D[N+1][N+1],dp[N+1][N+1];
bool op;
void gauss()
{
	int d;
	for (int i=1;i<=n;++i) C[i][i]=1;
	for (int i=1;i<=n;++i)
	{
		for (int j=i+1;j<=n;++j)
			if (!B[i][i]&&B[j][i])
			{
				swap(B[i],B[j]),swap(C[i],C[j]),res=MD2(-res);
				break;
			}
		if (!B[i][i])
		{
			cnt++;
			for (int j=1;j<=n;++j)
				for (int k=1;k<=n;++k)
					Adder(B[j][i],1ll*C[j][k]*A[k][i]%mod);
			for (int j=1;j<=n;++j) A[j][i]=0;
			for (int j=i+1;j<=n;++j)
				if (!B[i][i]&&B[j][i])
				{
					swap(B[i],B[j]),swap(C[i],C[j]),res=MD2(-res);
					break;
				}
		}
		if (!B[i][i])
		{
			op=1;
			return;
		}
		for (int j=i+1;j<=n;++j)
		{
			d=1ll*B[j][i]*fast_pow(B[i][i],mod-2)%mod;
			for (int k=1;k<=n;++k) Adder2(B[j][k],-1ll*B[i][k]*d%mod),Adder2(C[j][k],-1ll*C[i][k]*d%mod);
		}
	}
	for (int i=1;i<=n;++i) res=1ll*res*B[i][i]%mod;
	for (int i=n;i>=1;--i)
	{
		for (int j=i+1;j<=n;++j)
		{
			d=B[i][j];
			for (int k=1;k<=n;++k) Adder2(B[i][k],-1ll*B[j][k]*d%mod),Adder2(C[i][k],-1ll*C[j][k]*d%mod);
		}
		d=fast_pow(B[i][i],mod-2);
		for (int j=1;j<=n;++j) B[i][j]=1ll*B[i][j]*d%mod,C[i][j]=1ll*C[i][j]*d%mod;
	}
	return;
}
void gauss2()
{
	int d;
	for (int i=1;i<=n-1;++i)
	{
		for (int j=i+2;j<=n;++j)
			if (!D[i+1][i]&&D[j][i])
			{
				swap(D[i+1],D[j]);
				for (int k=1;k<=n;++k) swap(D[k][i+1],D[k][j]);
				break;
			}
		if (D[i+1][i])
		{
			for (int j=i+2;j<=n;++j)
			{
				d=1ll*D[j][i]*fast_pow(D[i+1][i],mod-2)%mod;
				for (int k=1;k<=n;++k) Adder2(D[j][k],-1ll*D[i+1][k]*d%mod);
				for (int k=1;k<=n;++k) Adder(D[k][i+1],1ll*D[k][j]*d%mod);
			}
		}
	}
	return;
}
int main()
{
	int rst;
	n=read();
	for (int i=1;i<=n;++i)
		for (int j=1;j<=n;++j)
			A[i][j]=read();
	for (int i=1;i<=n;++i)
		for (int j=1;j<=n;++j)
			B[i][j]=read();
	gauss();
	if (!op)
	{
		for (int k=1;k<=n;++k)
			for (int i=1;i<=n;++i)
				for (int j=1;j<=n;++j)
					Adder(D[i][j],1ll*A[i][k]*C[k][j]%mod);
		gauss2(),dp[0][0]=1;
		for (int i=1;i<=n;++i)
		{
			for (int j=1;j<=i;++j) Adder(dp[i][j],dp[i-1][j-1]);
			rst=1;
			for (int j=i;j>=1;--j)
			{
				if (j!=i) rst=1ll*rst*D[j+1][j]%mod;
				if (!((i-j)&1))
				{
					for (int k=0;k<=i;++k) Adder(dp[i][k],1ll*dp[j-1][k]*D[j][i]%mod*rst%mod);
				}
				else
				{
					for (int k=0;k<=i;++k) Adder2(dp[i][k],-1ll*dp[j-1][k]*D[j][i]%mod*rst%mod);
				}
			}
		}
		for (int i=cnt;i<=n;++i) F[i-cnt]=1ll*dp[n][i]*res%mod;
	}
	for (int i=0;i<=n;++i) printf("%d ",F[i]);
	puts("");
	return 0;
}

詳細信息

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 30
Accepted
time: 0ms
memory: 6148kb

input:

50
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 179093706 0 0 0 0 0 873235003 0 873022990 0 0 0 0 150372208 0 0 0 0 0 0 0 0
540031202 441544333 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 30490606 0 23238599 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

0 436083536 175535903 554959884 223039496 58344364 587204040 55300817 397840744 155512976 415872342 477738866 352386530 53242600 485943331 139434001 914586784 544887336 464494428 399973492 144143987 524998117 938746522 91863621 401839366 833514493 170911469 632598634 939655150 515206919 825564296 65...

result:

ok 51 numbers

Test #2:

score: 0
Accepted
time: 0ms
memory: 5908kb

input:

50
0 0 0 0 0 0 865147437 0 0 0 0 0 0 0 0 0 0 0 0 0 892479829 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 19576557 0 203729377 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 874545437 0 0 0 0 0 0 0 0 ...

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 

result:

ok 51 numbers

Test #3:

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

input:

50
666159473 440670429 510738291 504202619 0 350557853 590762418 810462395 181323356 0 457188244 491622090 347541380 751726940 231615249 726500956 954377758 617126798 391240582 467481921 418356623 149910257 146581619 315774821 236385812 117496640 634748946 315228151 853935226 0 437123244 978656468 0...

output:

39398860 926439968 438765155 724976248 594213695 167425923 587528267 284768667 73653406 259805677 82462983 83407685 573878321 72264113 545576724 360658776 119045660 422987649 743658284 583131760 441616546 970274465 724248398 797307152 690695173 36182380 685387007 25419367 914743956 46860078 34161074...

result:

ok 51 numbers

Test #4:

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

input:

50
0 234506790 0 715154759 99115010 231025742 755030988 0 0 0 146417655 0 915617978 0 0 691020395 173510973 456428247 0 394265079 0 0 0 953534270 0 874971542 898266718 0 948375902 0 0 0 0 0 0 0 0 0 252854252 0 0 0 768939131 0 0 694491359 0 0 0 796110525
216175608 0 0 0 0 0 776824419 0 0 0 357690362 ...

output:

141015794 599342787 680312504 471591675 511065406 380019480 980173887 270063339 145784225 19477689 272449207 44932257 678205945 917259961 409809006 853493157 888639735 174617060 845340173 711609565 679190927 330758264 923635224 552477622 768958302 787141361 9445917 85097768 377489202 136240899 51315...

result:

ok 51 numbers

Test #5:

score: 0
Accepted
time: 0ms
memory: 5872kb

input:

50
750536234 0 423676829 156973666 342391475 0 269587546 0 701752131 0 899144010 0 924599123 262658456 856118037 0 524095212 0 0 0 774140585 687450839 790346327 0 407213499 0 114640383 315078797 0 0 484458308 211129135 0 0 0 480554292 0 874606521 0 611141255 0 921918077 246086190 303213450 0 2924878...

output:

155382429 300500458 304766564 977267809 594424161 900971743 44146589 250595784 101389855 972453646 884960270 7931762 86956582 540581970 858382127 905566730 611945476 873806623 10039781 119616718 609682806 574528865 847145348 563674497 740042325 849319090 706797348 196452175 207228386 266078263 39163...

result:

ok 51 numbers

Test #6:

score: 0
Accepted
time: 3ms
memory: 5924kb

input:

50
951551567 37325813 0 79423443 2068034 885871026 775224147 766930667 258343511 0 777151789 616527418 839682916 396041163 192573703 229048803 949340586 713895147 489792300 801462648 511168369 532394611 578197063 0 46862575 0 91404922 5829914 885897421 602414159 537885052 632019550 478337906 5808696...

output:

172239906 397628189 65902517 739611316 606825620 317141817 898397451 332318466 785876316 141064857 923661827 968467916 274852115 805878656 303903040 838001254 985212733 520145210 60645158 573733802 545172206 666691725 828173167 502849531 428149875 699142908 118642244 957305916 406881362 562364767 17...

result:

ok 51 numbers

Test #7:

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

input:

50
309662455 925260045 380458486 843640570 965373173 650915700 138051394 119077249 295978183 909543019 511188539 348716022 622002079 19527119 85705277 7249996 79416775 806285823 95669866 224916201 135747133 521008347 424739729 486738258 0 369962069 13717241 561591243 604129407 145237193 480525322 75...

output:

825688824 540628594 439887429 685373725 936186060 957959036 921337616 356646111 941433456 866832138 92318348 117189572 917417557 69389825 46502857 801017869 403881868 261681551 94260642 399097582 602397903 412668467 173331089 487315640 770492173 128054143 896637397 836755572 488248033 794745384 9337...

result:

ok 51 numbers

Test #8:

score: 0
Accepted
time: 0ms
memory: 5972kb

input:

50
0 0 0 0 383027169 0 0 208745194 0 0 0 0 789827586 0 0 0 0 0 0 957781870 0 376819021 0 0 0 0 0 0 0 32762228 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 685108828 0 0 0 31162248 0 0 0 0 0 0 0 0 0 0 0 0 287855447 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 428557577 0 936324734 0 0 0
0 0 0 0 0 0...

output:

775672102 899406105 138974825 284554021 439791308 679440971 56702915 375692313 254494551 575509916 698159258 568976457 459285971 550889826 310494448 696598077 711659911 687912159 946546315 418932057 78733833 533431077 442596236 608325577 157268402 533785766 787543359 698758806 104403620 662063171 88...

result:

ok 51 numbers

Test #9:

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

input:

50
364748839 262117607 229058772 39217561 836544708 680427904 0 167060375 0 0 0 325438302 680857978 795124158 794384489 0 0 507003998 0 38838073 592621708 0 333857788 0 525278280 471076164 0 0 12016187 871658269 535394530 0 0 0 205105629 0 24024226 26471712 0 667726596 668881591 0 748795155 24862755...

output:

19315775 912843787 52761420 26875862 170766436 456152379 818800455 954588564 575129864 687470630 882985676 247888802 157345617 292048118 711964963 563600686 383928804 658358185 517437405 281816603 166685835 731719637 517569287 799739471 47888845 913373011 486096310 548828883 227591739 311720874 9009...

result:

ok 51 numbers

Test #10:

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

input:

50
613159520 120230035 0 0 0 107985603 473752771 563716516 511053599 0 238148580 381267084 508973915 630544517 0 683351340 688345418 714423495 0 0 299406852 0 168512896 105972039 172382433 0 0 0 0 838501389 0 0 291120745 0 297721353 96576710 0 0 0 228631559 667457592 0 206646684 0 19768735 169168361...

output:

463624995 439862174 479380459 229452974 435054695 422090445 963750343 436659964 938434610 841526809 844957371 55885658 946912074 407254481 167883846 89420404 721282411 955425050 954583434 682905399 433742387 953303584 455057117 559633338 55246999 503504963 671369161 142065745 723354271 27670570 1057...

result:

ok 51 numbers

Test #11:

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

input:

50
0 553073844 0 0 185474714 0 0 165131165 0 0 0 0 471868746 0 225330982 243602709 464651512 0 0 0 694758665 0 0 0 3356517 0 719284954 0 432203775 701293785 619218464 459628715 0 0 905423662 0 704913997 0 0 0 0 0 0 0 307765491 0 0 0 368396500 0
0 758743838 737470744 0 411526935 942384883 0 0 3970849...

output:

190390624 278098951 970368470 554798908 929972629 2064694 835880388 783564820 110425758 187144546 642839161 169225450 909221534 347359128 13825966 770209532 692807943 644879599 337044720 38521070 874900945 607898468 175185261 218774843 912519161 7634914 710990592 612214049 666855766 759436403 548984...

result:

ok 51 numbers

Test #12:

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

input:

50
0 935132232 922479325 829628501 0 0 122620498 0 2125127 0 0 0 0 0 291521697 0 0 191823577 0 305867399 670295514 788712071 0 0 0 814117690 746769765 0 990259627 293346449 757274779 225597030 825653984 696961412 440829479 0 0 347083760 293376060 0 578066628 356394960 245673957 593965820 70929583 95...

output:

365276356 346433201 659925285 379736722 585351978 182847082 809826239 894265514 691197399 960770297 958338379 161323498 265833112 355548531 849789491 917747682 181904683 793390971 610294685 448292125 145277673 790555407 678908869 745458180 217585495 597248433 322696478 127248297 57412372 326437577 4...

result:

ok 51 numbers

Test #13:

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

input:

50
0 0 0 0 0 0 0 653268736 0 0 0 0 923400103 0 0 0 0 0 0 51950688 0 824969388 0 460444975 702445148 978015637 0 0 0 0 0 489824231 0 0 0 0 0 449386884 115289049 0 0 0 94109678 190707537 0 0 0 411511570 725349198 0
569112969 0 278750645 0 0 0 0 0 0 0 0 0 898212643 0 0 0 0 0 976396348 0 0 0 113455683 8...

output:

912781524 197004987 137167756 957392362 387778118 864497427 119285409 684960451 444790098 469780596 66969634 320879723 343586163 981156433 819814952 781189325 333824820 348180934 991783170 725011288 948964346 183733191 106697480 201527162 365200012 411520363 684954456 750874130 580893772 797116812 9...

result:

ok 51 numbers

Test #14:

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

input:

50
565507246 314920979 617400579 0 347909100 482965068 0 943592379 426613146 689661661 693209941 0 309698521 525971242 713008253 248403259 761703141 114146900 672280131 329245982 568497403 663964541 0 0 266815209 271495850 610215970 879120790 22892118 0 983172469 747657846 0 729004601 738351762 3570...

output:

752051056 893203475 298293881 770108696 912187958 230358498 172303922 982771058 990264844 357890956 184147644 213424789 106419075 209352933 197010773 247534867 752661578 729514702 363083607 684664711 396779377 336124979 101061626 990495304 862347524 967418807 608267243 714855227 732538495 633196960 ...

result:

ok 51 numbers

Test #15:

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

input:

50
153402384 249536261 391968390 71764933 929070196 0 769106166 854490361 43220499 537021205 158958303 560200888 554198327 824491228 0 892500839 982549276 421593995 972245922 0 640799234 102571123 57137283 49862521 307213248 631517677 204583661 732871349 70649187 142829407 0 0 957530813 243527838 13...

output:

66098008 154772819 526070139 874583106 685024473 551304193 882675354 27993655 282996049 559498732 147513688 532084460 22648946 729803353 356215069 939422585 983732667 956052842 370905684 954815664 920305433 69821426 523816008 728065520 545821324 170960952 778590994 89054687 400829185 837618219 29635...

result:

ok 51 numbers

Test #16:

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

input:

50
0 0 195075377 313282836 0 829094024 0 0 0 54414629 0 0 0 0 0 0 0 0 0 0 101107810 824286656 731820848 0 17806992 55371469 0 0 0 0 0 0 0 0 0 546403652 0 0 539260707 0 0 570409177 0 238303240 0 0 0 279250353 253126978 0
518609079 0 124172658 463020205 729228591 0 0 0 0 0 0 0 0 217844798 810689787 20...

output:

832794440 122877402 598800756 434449399 604397104 570192167 920581352 225746237 692185559 9560091 741128506 267227537 868652148 840577421 222141931 59490027 728018399 843392605 477943481 905583651 299291827 453071758 685001395 603398138 321740146 625817983 289126980 191607783 34501032 517344371 5341...

result:

ok 51 numbers

Test #17:

score: 0
Accepted
time: 0ms
memory: 7956kb

input:

50
252699781 433731989 973415787 937044456 126494791 127875432 175959404 871925417 601947342 231477675 929706115 462495346 665152898 805248457 922983563 743451142 836069610 471997478 422341511 508926818 492030319 594432817 171025600 903298550 359364450 330216316 168546322 597294633 409021432 0 41816...

output:

215774306 942678020 317271254 479824180 689956688 956892095 247785951 811616468 106285022 881787148 232797221 515429441 8434216 66814440 371784316 687936395 823502426 882068341 965046427 17128268 110007714 563528635 85000796 377853394 309810368 48611668 799225675 965577923 306355762 254883342 985779...

result:

ok 51 numbers

Test #18:

score: 0
Accepted
time: 0ms
memory: 5968kb

input:

50
461838459 275829920 954593080 0 624989534 556119036 188579239 325686460 694571121 205355227 898677549 972101731 51526755 300733424 219591369 577992545 952062600 434299822 143352606 631047945 149239856 704676819 506035511 342554423 991163503 386829779 368675497 631050836 57118656 624456974 8192145...

output:

7364242 170202398 301843684 405651428 241658075 633429920 58938105 673086903 913416929 569840719 60036938 557835895 382586742 672591117 111574317 327071930 558815689 612571299 839354556 868339596 403314453 683346076 232190059 466794268 997513702 536853076 780332009 48300560 260469358 128613281 25392...

result:

ok 51 numbers

Test #19:

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

input:

50
144242090 138663925 0 145186490 0 640074989 0 0 300457549 0 472263692 0 0 0 0 0 585155750 232082021 0 0 181657415 284623532 0 0 0 885011257 218200942 0 0 493724919 260508642 601031081 521394894 0 0 0 0 293071670 23169998 0 564635899 0 0 700329397 658187184 0 601980192 345094044 318750511 66766512...

output:

737466238 704584659 151413207 288903107 363358549 1603135 908134201 701649008 389986949 247188836 286941145 82615549 410088043 90364163 964713338 132235675 867254207 969737988 548935144 33923167 71371717 317736991 378682062 692720944 506750847 649486611 150937174 287075748 799431512 458752720 983352...

result:

ok 51 numbers

Test #20:

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

input:

50
0 0 0 0 780480540 0 941930735 826515896 0 509875568 0 282124617 0 0 0 956594381 802617022 36623875 0 0 0 0 0 0 0 0 521781355 0 0 0 0 0 0 0 0 0 221542610 0 0 0 0 0 0 0 0 587835158 0 0 583116443 0
0 254091883 0 474215030 0 0 0 0 0 233535840 0 433855722 134241275 0 0 0 0 0 0 928246801 0 934579772 0 ...

output:

199906886 851988332 227125027 867744692 626456346 271359598 202755979 563079864 288107368 503303186 76230331 61995098 506706276 557815621 261146206 879287998 477229011 710896135 456863251 207463965 36314074 597707644 647309697 505515390 217305462 542011205 990325021 578313117 184372154 854354735 175...

result:

ok 51 numbers

Test #21:

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

input:

50
580958337 176371734 0 720498387 429565693 0 0 0 0 813185961 0 0 590639586 0 0 0 466058970 0 0 0 0 0 34118042 0 0 0 941684815 0 0 931295469 0 0 761159288 212378517 0 0 97884667 523804181 0 157318882 0 0 0 0 0 912910904 80441399 0 0 186057985
0 0 853601800 0 645071101 0 984183588 869289238 0 610940...

output:

182764951 78733283 398437658 878057646 830383448 915566273 668063585 33469544 105078494 483510288 868259640 452100549 402366751 700145793 87065057 837135736 310082310 177103642 581263041 246754059 332051339 897534302 226423068 801107657 50898535 455387807 947181772 758690582 482252094 257980373 9806...

result:

ok 51 numbers

Test #22:

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

input:

50
973633416 358566416 786185376 157734393 438478029 29985902 331805787 711234169 956524645 16588983 42651256 422865668 185815660 406927090 670638144 521229356 336968140 541209329 311156769 2303577 741735410 0 46453618 46775471 714418528 463456399 733269805 931768939 13899083 490409023 264174174 780...

output:

148093849 139340817 636228737 947216605 693770665 640020550 272839607 37406693 62431091 880784586 529461199 430478686 406825117 496163791 145802755 927818526 811971500 237280380 549276825 270452488 379141730 501678062 135917090 419909998 688360586 574755000 461643611 813107740 157918840 458974474 73...

result:

ok 51 numbers

Test #23:

score: 0
Accepted
time: 0ms
memory: 5856kb

input:

50
25979735 966393775 0 928472968 609658850 0 0 156012657 0 0 0 0 176310681 0 664235468 319366529 267745019 833526960 0 60960328 251788868 582082036 0 0 393114935 234233477 0 0 0 0 422930401 0 123167393 0 0 0 0 0 280529030 0 270528492 0 0 918904565 0 0 0 819771321 0 802058899
862165864 110010699 0 9...

output:

694007200 247877628 985150828 29493693 37996907 396838081 136113985 372717512 879881531 698462413 627190516 793346986 492356791 38418730 98776553 358339839 812257649 627436444 583014284 905212662 260422728 733429872 799579644 444744984 859926658 802860101 64911523 434961497 991333105 104839961 48771...

result:

ok 51 numbers

Test #24:

score: 0
Accepted
time: 0ms
memory: 6088kb

input:

50
497581250 0 504368585 0 960260382 0 778968898 98975462 0 0 0 588853415 0 0 0 0 127906591 0 0 598867689 0 117295897 0 616066957 0 0 0 0 0 0 0 0 610324869 32451029 120273935 898495494 0 0 612353683 648712135 228572602 0 0 0 0 0 0 0 559350233 0
882423251 0 545955511 0 845035306 0 0 557625815 0 0 0 4...

output:

404031134 59625346 103018326 685578699 87306405 789794370 932998433 580510452 700472477 504829476 427291573 410471355 858483956 982867575 619082197 959051394 543117033 975944901 107111191 873888801 333647267 141708224 36806304 149507046 846902762 100947135 464662955 41610799 455686329 958413695 7969...

result:

ok 51 numbers

Test #25:

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

input:

50
0 489849162 0 832007017 0 903150757 334177710 0 0 823099289 475770048 374106207 884332221 0 655713834 0 0 469101146 0 362198020 460811536 0 0 0 0 0 0 0 205860360 490179634 753197728 0 0 0 663488105 0 0 0 0 0 264827825 0 841295233 0 92635241 0 71133821 903059607 0 53743065
0 567252111 0 127837041 ...

output:

85847274 709598539 296015064 529064132 166326971 838672251 71661204 457887229 647223450 438823110 747962485 386968640 706370298 330982458 318612108 6258716 850387234 392395955 251431238 697510029 91160506 298755065 893453796 20352717 382799719 3866949 565391361 95948153 16743891 128719606 334615341 ...

result:

ok 51 numbers

Test #26:

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

input:

50
0 0 0 0 713415496 0 0 0 0 0 0 0 0 0 0 0 0 0 96404132 0 0 0 697272728 0 0 972877878 0 0 250149006 0 0 137261492 0 0 0 0 0 0 0 0 0 0 0 328460566 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 881970998 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 163420028 0 0 0 0 0 0 0 0 672072432 0 0 0 0 0 0 790452908 0 0
0 0 925771...

output:

97357575 864787305 612932328 237843705 154211040 294748918 806939062 579819378 329847330 216803181 371467348 99227331 552223549 374066687 244677208 364931752 603694573 765521963 442656183 955102586 484704420 237717630 868133648 642424483 343293713 817985343 472416782 771420125 258313040 766666234 71...

result:

ok 51 numbers

Test #27:

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

input:

50
0 0 0 63247615 0 791076461 0 0 0 0 0 0 0 587371500 0 674661496 815544254 361375659 446621745 0 84767228 505913899 0 296491943 619036861 0 0 0 213947693 0 0 477003450 133177000 0 0 0 0 0 0 0 0 0 865889671 0 0 0 0 0 0 0
0 0 0 94158102 0 717440503 351881080 47408518 0 334587139 898597115 554196508 4...

output:

581345430 517272544 27424311 177987117 360750626 992415401 852308621 685010590 767412462 911289934 82632874 823104414 495165991 603362092 329947880 546915693 606192519 894875574 117328437 593182883 356248492 705868109 740046066 903693935 633908731 57555246 841433278 664653857 57003951 267587808 6848...

result:

ok 51 numbers

Test #28:

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

input:

50
498256497 572638536 547555552 558596365 0 170374319 945776750 109115745 899680609 287733871 605659413 454660021 979491474 554517679 209340002 857539943 88707985 847516124 11893592 851894836 217334719 95345308 578201122 590857399 422722795 96468920 907022866 835594790 460901630 490370579 130446989...

output:

285926032 806226889 271806820 460919109 815187481 729948370 928610112 692016758 656619963 724160494 52022224 121036944 72433641 66312299 386964036 954066486 564246907 508090523 13874624 382680865 688956522 495611396 520875596 412003224 988341366 152148134 220716020 2342792 242286157 590024029 266437...

result:

ok 51 numbers

Test #29:

score: 0
Accepted
time: 0ms
memory: 7724kb

input:

50
0 29598781 915598378 673859700 923225830 0 794314879 311128153 743126892 968414910 180626182 0 0 409916085 442492237 547276361 598588906 247154035 0 621616064 370562272 713869834 0 656987868 492847689 478264939 0 769414081 0 0 925189393 140269195 992737892 969701394 192341663 0 0 217282392 585645...

output:

45540938 196013144 508280975 746238134 40158821 261426345 928031034 706339153 693950812 393345583 319363717 996205530 48226765 599834058 399735294 667864750 857603756 8448720 512795237 655354651 830282365 21454267 25371740 703766982 750221051 329472918 210313069 171312495 383239000 654028336 8604671...

result:

ok 51 numbers

Test #30:

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

input:

50
0 0 0 0 806896459 178851573 0 0 0 0 0 0 0 0 0 599043664 0 0 0 0 0 549487629 93627576 0 0 0 0 0 0 0 0 0 0 0 0 0 0 887716132 625632408 0 0 0 0 236156358 0 0 0 11187294 0 0
889604636 0 612734600 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 341925621 0 0 0 951380590 585561852 0 0 0 0 0 0 0 0 0 0 0 0 0 0 623...

output:

142543483 862236128 93045642 467709387 939841554 248542887 207650437 712328858 389217012 120390497 20736181 173917445 880740963 671339911 757068330 203638185 782636829 477868926 15340737 268510264 849046033 909127661 190920536 402521186 580436351 233311368 927186296 715067990 1367065 581163913 98690...

result:

ok 51 numbers

Test #31:

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

input:

50
305014160 524382709 829941526 867540297 696553015 372724335 923147031 927887059 692347678 353161846 801931193 450058388 674050463 819839640 0 0 861292516 33837861 499813197 683767863 859840355 149657342 0 689351189 89154173 967748954 41641626 540976207 915663608 879204096 371498939 174257078 5519...

output:

157036115 56649934 942810863 711416759 721169155 968975774 299761915 24435827 580465286 40388399 559138132 76551404 528569577 933633188 850164729 767187716 590242225 757554243 347274597 261824939 825810159 464254161 720731024 550330762 265387290 830846453 891396266 881564150 747368494 832572540 2146...

result:

ok 51 numbers

Test #32:

score: 0
Accepted
time: 0ms
memory: 7952kb

input:

50
0 332805608 325297760 0 344420757 0 706065384 352055777 66248264 705470852 798882102 0 701575525 93780210 0 337137716 0 210440501 0 0 0 0 0 676149101 0 0 0 0 427965227 192501836 0 977879842 0 0 0 0 0 0 0 471451788 920212926 533522365 985961100 0 0 167343404 779631306 0 580523963 510745807
0 0 0 0...

output:

40647678 695167686 319899684 573020731 43008672 348043132 6361129 936377018 817838989 196660535 274771565 49330069 789735301 163430420 459304914 278623975 339678485 754436822 24918136 501929588 237948081 100389814 260627121 644465712 757872460 419123770 777728667 820109391 634956939 703872042 989546...

result:

ok 51 numbers

Test #33:

score: 0
Accepted
time: 3ms
memory: 7836kb

input:

50
774291169 0 859529726 0 493529599 730293941 0 927780780 0 90003560 906022607 188622688 0 898371072 93648392 447723197 527046109 335828481 0 372572473 413327975 975432600 489494224 0 0 874721427 809666984 792652457 19448597 332505912 0 387762529 644440178 511432771 0 590977110 373349689 0 0 642656...

output:

857701700 730527904 799500956 220566009 530145222 709230354 283218022 386878028 605175903 405290595 213117058 415037406 115843352 384868123 245556121 107558625 618546482 375296675 144125047 981827353 347528569 452270651 426237316 963797709 664820153 407752376 472188109 428141094 868678217 645521290 ...

result:

ok 51 numbers

Test #34:

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

input:

50
0 0 0 388106480 0 0 0 0 0 0 0 726735858 727629619 19530760 970102742 0 0 0 0 0 0 866697017 0 0 0 0 0 0 200676068 0 0 666563613 0 0 616589527 477640512 112623387 399842997 0 0 0 16498067 0 311785339 780951107 774214216 0 575187491 0 0
715827288 696421005 0 0 320186545 0 0 0 0 827655278 0 0 9434544...

output:

668790306 12695991 97695933 896758218 606343432 921354325 729411541 823528290 334057480 731305005 118127204 395854528 811854348 793655304 804004122 667019605 253542898 220907687 10771731 864845070 285347036 222123530 242578418 900932739 554322442 520438707 209680665 619543135 96694607 531574412 8034...

result:

ok 51 numbers

Test #35:

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

input:

50
548365635 0 0 628673659 24569340 350843588 686380951 0 362523323 569539717 0 0 816885391 842065384 285014910 207977595 0 401466283 0 865947035 719245735 0 0 853602543 0 424578774 0 0 0 510439500 393611031 113997285 159638737 0 0 0 0 51987534 66119512 0 390269973 349982174 0 71373464 0 340263199 8...

output:

166001607 108781528 916306867 116948543 573164607 313827725 805618172 795471778 216763439 605248199 15734873 634871377 554715379 48034611 770616013 794658570 824366068 204449306 994763732 581801775 856191415 69483590 525866154 691224679 563959625 33020205 802088912 930085697 561742832 323576256 4637...

result:

ok 51 numbers

Test #36:

score: 0
Accepted
time: 3ms
memory: 7840kb

input:

50
623854785 304005771 406290664 0 41564565 37069561 884658200 430602250 159970262 237962649 245537439 221834343 38391591 14380035 927743396 639313295 0 297541432 613208148 664515667 663767400 410333709 628103063 479882945 0 902566760 0 166216371 857382674 698130055 393879082 751793436 863883247 485...

output:

674806401 741682958 201555155 298756951 881362561 17857923 313761131 947193326 48766868 563376515 809889425 116461449 255078727 758797987 568706357 9675541 34447330 59549843 386422922 969909001 161875097 682935893 121459727 794541864 67711002 621382122 418319101 763366589 192393231 952181966 4410161...

result:

ok 51 numbers

Test #37:

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

input:

50
23953710 942062415 282414067 876526153 723678111 77639049 741112372 779115497 825632577 0 0 481623040 900669589 955495584 0 634137664 183523027 0 63347453 271594522 928157564 253523883 425731139 774311836 979137060 222464496 851811065 464511022 930926036 27023400 725831139 99540209 576617697 8032...

output:

793136815 299798696 776663738 472389824 585654543 24313117 544869420 810026620 739365151 201290348 653421767 745716909 627651545 68273786 984290642 322513051 549981241 209392201 163071781 233565458 578951148 845362391 521117267 247375312 187890661 293987020 538224479 163157434 512063476 927991598 10...

result:

ok 51 numbers

Test #38:

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

input:

50
0 330126912 761822894 0 0 0 158036589 0 737202818 480950783 0 392571500 0 0 865761847 0 0 875389691 0 65857494 0 0 0 879288950 0 0 160155808 0 694472534 0 0 456915740 820317828 344380651 0 0 78558584 971574124 260793266 0 545508978 0 0 608434855 0 0 0 0 0 516284419
0 266027892 0 154716877 4872361...

output:

907937858 333176009 504634006 435640307 906293664 146955027 292679278 620651151 216852333 802175508 468571925 602591501 415172154 946183935 437517972 590710777 783184568 8952977 893085490 670421550 665446930 435895703 405171450 311472370 724578617 862094824 106007853 512786305 846323966 582624060 98...

result:

ok 51 numbers

Test #39:

score: 0
Accepted
time: 0ms
memory: 7824kb

input:

50
0 818395784 0 0 0 0 0 0 0 0 0 162087450 0 0 0 0 0 0 0 0 0 0 374157100 92429455 0 974888260 0 0 0 0 0 950195440 0 0 0 654560385 0 0 0 0 495137499 0 0 0 0 0 0 396148535 0 0
0 0 0 746462155 0 0 0 0 0 0 0 273876984 0 0 0 0 0 0 0 0 0 0 839311055 0 0 0 0 0 0 0 0 860328282 0 0 0 0 0 0 0 0 0 0 441929136 ...

output:

311358073 585387891 655707376 299881307 81413627 170086102 202039793 317178981 714605563 641519333 172392992 627222152 41704735 655843865 717378299 811246403 915131946 65739475 372309952 701156810 462213071 631268661 805294374 678169240 480879721 588732879 567413885 52944438 52325943 779117868 24388...

result:

ok 51 numbers

Test #40:

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

input:

50
0 0 162410724 0 0 0 0 581795795 0 0 0 0 738157787 0 0 0 0 0 0 246549102 0 282166311 0 0 0 17344778 0 120161209 0 0 0 0 0 0 107669105 0 289985463 341458944 490099463 0 0 473993658 729296893 870911213 0 882949393 0 0 189912017 368781900
370822456 0 0 0 0 0 891536134 64391251 825229480 149703315 0 7...

output:

230790550 815392739 346301771 786807347 498679438 425772591 310259802 218834393 6376164 504816895 17381038 550276033 794640696 653968337 960367937 604641478 15654294 228422368 274721023 753297071 708562338 354858135 413945057 853277076 306531072 115366992 144466029 24982108 784723329 348221181 33346...

result:

ok 51 numbers

Test #41:

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

input:

50
0 748322581 0 976287797 570217711 0 658475738 0 0 0 0 994285744 0 747343903 585265190 993635615 410940776 0 870116631 0 428736943 536191999 0 0 67293026 0 0 0 0 0 424698450 753856593 688389327 0 440839962 0 0 0 228254935 303066230 0 472672358 0 0 959453769 0 0 746106330 0 24534893
893320752 48256...

output:

190746992 942275232 43420365 167054362 718277116 284380361 64475062 602001077 528221620 232725948 197034139 484651906 135631677 311691841 838614271 43203127 104343492 491335050 498844747 215116236 34736183 901969771 590617700 131435460 240609836 69126001 394238569 510905976 306795954 668162760 26757...

result:

ok 51 numbers

Test #42:

score: 0
Accepted
time: 0ms
memory: 5976kb

input:

50
659679211 887444054 950467016 669383168 0 380526526 0 58321598 904704388 928225642 0 0 660784175 637443014 0 14815691 348612461 548003585 127013126 865120620 504624975 0 0 961337996 0 478505318 761398957 331550134 671831036 0 627866955 0 0 0 192674192 0 64915241 283788264 467568874 994907561 3893...

output:

751170063 459380603 17428798 72181087 566770270 627669728 309020767 130524326 384944066 100742110 332720520 775976292 597968492 677194995 265955996 516915970 274485477 750096902 800139323 482514420 320967706 39768790 482252702 826013703 230523085 972122363 372606099 81087279 207957159 992735007 4133...

result:

ok 51 numbers

Test #43:

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

input:

50
0 0 445650594 0 0 0 90261759 0 756661699 0 0 39243289 0 503158511 284707284 159678952 0 0 113065249 0 0 414908158 0 0 95190501 0 864405077 0 356517212 0 832621711 516398645 0 0 0 6033557 729041165 696616797 878385991 162986376 702898357 0 208342518 912620651 291364335 0 0 28717209 0 750793339
0 5...

output:

868173945 157983621 411960143 845477560 454924703 200401939 349536211 559843199 790642175 102949575 194222699 62412692 21401601 895925385 367300651 510977538 595176837 591732551 966139431 716467690 819442346 351950542 545888665 740353796 524666863 655777604 963870825 747096076 376830784 646402574 36...

result:

ok 51 numbers

Test #44:

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

input:

50
516694033 0 0 389134662 790951478 994789894 307335177 0 107285834 41984540 638431227 350926190 773370377 43913898 163300629 336873818 249343051 289110448 567414091 750066195 0 0 550453260 0 77060010 0 880906451 568353025 572903557 283261505 691487704 744401814 0 640119991 686143439 0 723868840 18...

output:

710785408 258614471 280616050 809502839 167086833 549648741 814787119 746715907 340003078 651722997 501538991 939420447 883125492 493206125 432577427 214686049 427533966 475238700 991287603 760459589 25308190 99755810 72921439 983065457 124110840 686133262 490500910 261840713 353107010 41138380 7740...

result:

ok 51 numbers

Test #45:

score: 0
Accepted
time: 1ms
memory: 7628kb

input:

50
967566325 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 97025499 0 0 0 0 0 0 0 0 0 0 0 0 0 0 681962237 0 0 0 426401463 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2971894 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 760152446 0 0 0 0 0 0 0 0 0 ...

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 

result:

ok 51 numbers

Test #46:

score: -30
Wrong Answer
time: 1ms
memory: 7736kb

input:

50
0 0 0 0 0 0 0 0 0 601994969 0 949624861 0 0 0 0 0 189909022 0 0 0 0 0 0 0 0 0 0 297373466 0 0 0 0 0 0 0 0 0 0 0 0 0 715226708 0 0 0 0 0 366584320 0
0 0 337509530 0 0 0 0 0 0 0 0 0 0 0 0 554921127 0 0 0 811072710 0 0 0 0 0 0 119012291 0 0 0 0 0 0 0 0 0 0 0 0 0 0 934514902 0 0 0 0 0 0 0 0
0 0 0 0 0...

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 

result:

wrong answer 2nd numbers differ - expected: '217935058', found: '0'

Subtask #2:

score: 30
Accepted

Test #51:

score: 30
Accepted
time: 842ms
memory: 8408kb

input:

500
0 0 0 0 0 482890969 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 1077401 0 0 210804413 0 508044994 0 0 0 398405351 0 0 0 0 0 0 0 171917316 0 0 0 0 0 0 0 0 0 0 0 429230725 0 0 0 0 0 45665526 0 0 0 925078893 0 0 396149045 0 0 0 595858405 0 0 0 0 0 57208...

output:

197564738 776338137 450758758 86100992 615937344 559163914 131406243 401619987 648971457 913370895 305548921 393285962 915689006 605421884 878026660 574429045 573319599 364491109 147359659 277065849 558700076 605737085 416281513 704015976 726983797 205432732 98536178 813856939 885823882 179190007 66...

result:

ok 501 numbers

Test #52:

score: 0
Accepted
time: 874ms
memory: 8708kb

input:

500
524607538 0 0 195818222 598065776 740433868 0 0 0 0 0 0 584106646 508647343 0 0 0 385186156 0 0 0 748826373 0 0 0 709897533 880532113 0 0 0 0 0 0 0 0 0 480030784 0 0 33138693 0 0 0 0 207633173 0 147270533 0 0 0 0 0 172244086 0 277695222 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 385815514 0 947687701 2...

output:

824902737 425089841 111211053 92073920 901320657 429074841 361764105 48023490 25552725 331325644 371920415 490762692 97825049 353418227 830075621 213540283 914362905 715071163 806070758 910602330 331161583 233467656 349280733 861811395 290106373 974369041 564660867 275072365 75983469 522667016 70935...

result:

ok 501 numbers

Test #53:

score: 0
Accepted
time: 838ms
memory: 8696kb

input:

500
0 398190947 624334613 582987942 0 921082574 0 17867538 0 882918848 0 0 0 0 0 0 90859360 987403245 0 0 0 0 0 0 0 0 0 0 0 0 0 403400811 206487768 0 18198869 0 0 0 651523038 0 192277158 0 0 880215749 0 48622723 931175582 0 380135628 0 187644792 600194396 306519041 0 0 0 646257188 970944730 0 0 0 0 ...

output:

529709961 782389501 427087181 171575244 807733566 948768941 227470506 729203216 600000785 571222788 426790680 997717883 801879168 465532628 857973057 906830434 952735394 45567541 544721647 962896743 742244545 82712613 959513155 325015907 233661306 823083787 9502003 223215085 232986129 315518020 8220...

result:

ok 501 numbers

Test #54:

score: 0
Accepted
time: 849ms
memory: 8532kb

input:

500
889477026 0 0 645288850 0 0 0 597784849 276670294 0 11781884 0 0 0 0 102328605 122546943 466795725 0 0 0 0 0 977951016 0 0 0 0 0 0 0 0 0 441400243 0 607727318 981252464 766407804 0 0 0 0 0 0 0 12674018 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 237392793 0 844896171 0 0 0 868060819 811717128 ...

output:

288878507 103918577 627843934 606769115 701195355 204316868 196692744 438647132 951275060 766989005 835482214 627619453 577296224 790244323 616919000 110197298 388088246 175117021 852199104 324078444 225511335 640854847 85621368 111580084 763931389 778949588 371252595 131117484 889375904 163824154 8...

result:

ok 501 numbers

Test #55:

score: 0
Accepted
time: 843ms
memory: 8464kb

input:

500
0 0 472907806 0 0 0 0 0 0 0 0 298001434 0 896885439 0 0 0 0 0 0 0 0 0 0 0 8484835 0 0 0 0 0 0 0 0 0 0 0 0 954775009 0 0 0 0 288641397 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 512435253 0 0 0 0 0 0 0 386794324 0 655001487 0 0 468232155 0 0 0 0 0 0 0 0 75466257 0 0 0 0 0 0 74943...

output:

748044473 495654177 770128837 803264522 500024782 363477079 635161545 374689496 309423961 60457280 220603722 725110497 211554274 483787612 417355740 860542674 222191891 579668034 936747129 810487962 924847717 455094044 702324829 104318236 971133785 696909055 744480349 911219026 235872106 543656615 5...

result:

ok 501 numbers

Test #56:

score: 0
Accepted
time: 852ms
memory: 8536kb

input:

500
0 0 316262547 241295061 242829688 550075323 245190856 935894298 504227016 176442273 184386996 0 575589507 830192730 0 557943520 895719881 60265103 747418748 261971973 0 99105521 0 69394805 134350353 205033556 151945738 123374702 411264285 912324098 94051646 306060455 899455875 830911129 63742779...

output:

381911851 916241926 514339398 858059197 875456460 714921300 302795193 409031920 783184712 867455007 766476017 243857202 697599556 921790119 792928980 251505819 994285379 59773659 613948150 272434631 907707976 207774347 94674353 668702663 837211956 421611818 372233312 483621202 904224325 602569053 47...

result:

ok 501 numbers

Test #57:

score: 0
Accepted
time: 837ms
memory: 8400kb

input:

500
0 0 0 0 0 0 0 610990574 461613184 433655130 0 0 388974760 806398739 360535781 0 0 0 753732657 0 0 0 0 300470084 0 799888093 321915786 0 731888269 93322740 0 0 0 0 0 0 718357562 0 0 470844951 0 0 0 0 249536634 0 0 720846833 0 0 0 0 0 375498602 834962478 0 0 747200658 0 0 0 0 0 0 179664325 5290568...

output:

686260393 252245335 487730469 316503441 65416924 414972730 492614441 687219169 31213691 279281581 975310019 317336196 211707471 522955573 667053639 354126512 154392544 651273989 460079160 129443229 861736087 105977196 569334344 960887538 833748346 509178819 299462294 951455142 655102577 313951685 21...

result:

ok 501 numbers

Test #58:

score: 0
Accepted
time: 843ms
memory: 8532kb

input:

500
105334543 923544035 0 0 916350532 0 893135971 0 38147030 0 787201908 432732664 0 721024223 708486999 0 701283493 0 0 0 763668271 0 109489133 715738358 0 218182028 0 486065021 0 0 0 853561005 114023429 0 0 601209488 0 101719806 611085551 10556195 0 0 200722083 810064594 0 428296558 88047945 0 905...

output:

386146069 360751156 993393533 927105682 228457601 648163753 787797973 522013271 115473192 964895477 558385286 95058804 298276053 139741955 517593941 927888946 390532694 926469984 546568354 927488188 867723462 62784459 519368506 183331379 408840670 685223323 395691605 356482931 538780329 800704761 25...

result:

ok 501 numbers

Test #59:

score: 0
Accepted
time: 835ms
memory: 8528kb

input:

500
557789613 330510931 0 0 518024711 0 177752966 206203179 584083921 0 621770000 463398931 325609625 655715403 0 644837061 920744971 211652106 501844095 0 31815431 0 508411090 0 299431284 579451022 0 0 560290181 405509081 925573968 0 687385031 953919102 11971443 653210418 0 460457820 270650741 0 19...

output:

237337972 304001552 19756092 903398432 956462082 763470480 729301817 271753612 613700267 334841355 744710574 845246375 971151604 973253901 927943894 280393511 949928036 38722121 474176453 8825977 60878082 249547234 597102095 651053724 429068288 490083950 904742452 549860299 952659239 940608813 73417...

result:

ok 501 numbers

Test #60:

score: 0
Accepted
time: 844ms
memory: 8528kb

input:

500
197401552 830689262 490108468 0 0 0 0 776237119 0 0 699253214 0 0 0 0 0 0 0 655156087 0 14751376 0 0 0 0 228028861 0 0 0 0 503139922 29233876 0 0 0 291395502 182147419 0 0 0 0 0 924694232 0 0 0 0 0 295585170 0 0 0 0 0 0 0 985603432 0 0 50944168 0 0 0 0 0 799660697 0 0 0 131935150 0 0 0 542518152...

output:

343481215 28530470 415182965 106440692 639253380 869174304 723450686 994252880 231059922 452274668 353261722 628878909 809794578 375900072 590410066 750447055 418962912 956023947 26017162 793161094 816016177 757605421 521424576 503928843 225335613 154352919 240264199 356448940 826417044 553721500 16...

result:

ok 501 numbers

Subtask #3:

score: 0
Skipped

Dependency #1:

0%