QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#43782#2553. BingoUfowoqqqoWA 2ms3776kbC++525b2022-08-10 22:56:252022-08-10 22:58:50

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-08-10 22:58:50]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3776kb
  • [2022-08-10 22:56:25]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

const int N = 110;

char s[N][N];

int main()
{
    int n, k;
    int i, j;

    scanf("%d%d", &n, &k);

    if(k > (n - 1) * (n - 1))
        puts("NO");
    else
    {
        puts("YES");
        for(i = 0; i < n; i ++)
            for(j = 0; j < n; j ++)
                s[i][j] = '.';
        for(i = 0; i < k; i ++)
            s[i / (n - 1)][i % (n - 1)] = '*';
        for(i = 0; i < n; i ++)
            puts(s[i]);
    }

    return 0;
}

详细

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3776kb

input:

4 2

output:

YES
**..
....
....
....

result:

wrong answer bad character in grid