QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#594968 | #2540. Build The Grid | gambit# | WA | 0ms | 3688kb | C++14 | 455b | 2024-09-28 11:38:45 | 2024-09-28 11:38:48 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N;
for(int i=1;i<=N/2;i++) {
for(int j=1;j<=N;j++) {
if(j<=i) cout << 'B';
else cout << 'W';
}
cout << '\n';
if(N==i*2) break;
for(int j=1;j<=N;j++) {
if(j>i) cout << 'B';
else cout << 'W';
}
cout << '\n';
}
for(int i=0;i<N;i++) cout << 'W';
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3688kb
input:
3
output:
BWW WBB WWW
result:
wrong answer white cells are not connected