QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#609016#9415. Matrixliguo#WA 0ms3864kbC++20403b2024-10-04 10:15:362024-10-04 10:15:37

Judging History

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

  • [2024-10-04 10:15:37]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3864kb
  • [2024-10-04 10:15:36]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int ans[100][100];
int main(){
	int n;scanf("%d",&n);
	printf("Yes\n");
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			ans[i][j]=1;
	ans[1][n-1]=2,ans[1][n]=3;
	for(int i=2;i<n;i++)
		ans[i][1]=i+2;
	for(int i=2;i<=n;i++)
		ans[n][i]=i+n;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++)
			printf("%d ",ans[i][j]);
		printf("\n");
	}
} 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2

output:

Yes
2 3 
1 4 

result:

ok Correct. (1 test case)

Test #2:

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

input:

3

output:

Yes
1 2 3 
4 1 1 
1 5 6 

result:

ok Correct. (1 test case)

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3792kb

input:

4

output:

Yes
1 1 2 3 
4 1 1 1 
5 1 1 1 
1 6 7 8 

result:

wrong answer The number of quadruples 3 is invalid. (test case 1)