QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#23000 | #2540. Build The Grid | FudanU1# | WA | 3ms | 3724kb | C++20 | 357b | 2022-03-11 14:57:48 | 2022-04-30 02:13:21 |
Judging History
answer
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int n;
bool b[600][600];
int main(){
scanf("%d",&n);
for(int i=n;i>=2;i-=2){
for(int j=2;j<=i;j++)b[i][j]=b[j][i]=1;
}
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++)if(b[i][j])putchar('B');else putchar('W');putchar('\n');
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 3ms
memory: 3724kb
input:
3
output:
WWW WWB WBB
result:
wrong answer there are no white cells around a black cell