QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#43782 | #2553. Bingo | Ufowoqqqo | WA | 2ms | 3776kb | C++ | 525b | 2022-08-10 22:56:25 | 2022-08-10 22:58:50 |
Judging History
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