QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#353864#6189. Full Clue Problemmatongc233WA 0ms3736kbC++171.1kb2024-03-14 18:13:122024-03-14 18:13:13

Judging History

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

  • [2024-03-14 18:13:13]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3736kb
  • [2024-03-14 18:13:12]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int N = 22;
typedef long long ll;
typedef pair<int, int> PII;
int g[N][N];

int main()
{
    int n;
    cin >> n;
    int k = 4 * n / (3 +2* (n - 2));
    for (int i = 0; i < n;i++){
        for (int j = 0; j < n;j++){
            if(abs(i-j)<=1){
                g[i][j] = k;
            }
        }
    }
    g[0][0]++;
    g[n - 1][n - 1]++;
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            printf("%d", g[i][j]);
            
        }
        puts("");
    }
    puts("");
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            if(i-j==1||i-j==0)printf("%d", 1);
            else
                printf("%d", 0);
        }
        puts("");
    }
    puts("");
    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < n; j++)
        {
            if (j-i == 1 || i - j == 0)
                printf("%d", 1);
            else
                printf("%d", 0);
        }
        puts("");
    }
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3736kb

input:

5

output:

32000
22200
02220
00222
00023

10000
11000
01100
00110
00011

11000
01100
00110
00011
00001

result:

wrong answer Integer parameter [name=a[i][j]] equals to 32000, violates the range [0, 4]