結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
d_sei
|
| 提出日時 | 2019-08-27 20:42:29 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 610 bytes |
| コンパイル時間 | 681 ms |
| コンパイル使用メモリ | 78,516 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-17 04:47:09 |
| 合計ジャッジ時間 | 1,217 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include<iostream>
#include<algorithm>
#include <vector>
#include<cmath>
#include<iomanip>
using namespace std;
typedef long long int lont;
int main() {
int W, H;
char S;
cin >> W >> H >> S;
if (S == 'W') {
for (int ia = 0; ia < H; ia++) {
for (int ib = 0; ib < W; ib++) {
if (ia % 2 == ib % 2) {
cout << 'W';
}
else {
cout << 'B';
}
}
cout << endl;
}
}
else if (S == 'B') {
for (int ic = 0; ic < H; ic++) {
for (int id = 0; id < W; id++) {
if (ic % 2 == id % 2) {
cout << 'B';
}
else {
cout << 'W';
}
}
cout << endl;
}
}
}
d_sei