QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#609074 | #9415. Matrix | liguo# | WA | 0ms | 3848kb | C++20 | 458b | 2024-10-04 10:30:26 | 2024-10-04 10:30:26 |
Judging History
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)