QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#609229#9415. MatrixUESTC_PenaltyAutomaton#WA 1ms3820kbC++17828b2024-10-04 11:20:192024-10-04 11:20:19

Judging History

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

  • [2024-10-04 11:20:19]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3820kb
  • [2024-10-04 11:20:19]
  • 提交

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)