結果
| 問題 | No.82 市松模様 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-03 06:38:25 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 303 ms |
| コンパイル使用メモリ | 71,756 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-04 15:38:34 |
| 合計ジャッジ時間 | 804 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <iostream>
using namespace std;
int main(){
int W, H;
char C;
cin >> W >> H >> C;
string color;
if(C == 'W'){
color = "WB";
} else {
color = "BW";
}
for(int y=0;y<H;y++){
for(int x=0;x<W;x++){
cout << color[(y+x)%2];
}
cout << endl;
}
return 0;
}