QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#609074#9415. Matrixliguo#WA 0ms3848kbC++20458b2024-10-04 10:30:262024-10-04 10:30:26

Judging History

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

  • [2024-10-04 10:30:26]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3848kb
  • [2024-10-04 10:30:26]
  • 提交

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++)
		ans[i][i]=i;
	for(int i=2;i<n;i++){
		ans[i][1]=ans[i][n]=ans[1][i]=ans[n][i]=n+1;
	}
	ans[1][n]=n+2;
	ans[n][1]=n+3;
	for(int i=2;i<n;i++){
		for(int j=2;j<i;j++)
			ans[i][j]=ans[j][i]=n+i+1;
	}
	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: 0
Wrong Answer
time: 0ms
memory: 3848kb

input:

2

output:

Yes
1 4 
5 2 

result:

wrong answer Integer parameter [name=a_{i, j}] equals to 5, violates the range [1, 4] (test case 1)