QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#609016 | #9415. Matrix | liguo# | WA | 0ms | 3864kb | C++20 | 403b | 2024-10-04 10:15:36 | 2024-10-04 10:15:37 |
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++)
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)