QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#609229 | #9415. Matrix | UESTC_PenaltyAutomaton# | WA | 1ms | 3820kb | C++17 | 828b | 2024-10-04 11:20:19 | 2024-10-04 11:20:19 |
Judging History
answer
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
const int N = 55;
int n, a[N][N];
int main(){
scanf("%d", &n);
if(n == 2){
printf("1 2\n3 4\n");
return 0;
}
else if(n == 3){
printf("3 2 6\n4 3 3\n3 1 5\n");
return 0;
}
for(int i = 1; i <= n - 2; i++){
for(int j = 1; j <= n; j++) a[i][j] = i;
}
int p = n - 1;
for(int j = 1; j <= n; j++){
a[n - 1][j] = p;
a[n][j] = p;
p++;
}
a[n][n - 1] = p;
a[n][n] = p + 1;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
if(j > 1) printf(" ");
printf("%d", a[i][j]);
}
printf("\n");
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3820kb
input:
2
output:
1 2 3 4
result:
wrong answer Line [name=yesno] equals to "1 2", doesn't correspond to pattern "Yes|No" (test case 1)