結果
| 問題 | No.82 市松模様 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2014-12-03 06:38:25 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| + 356µs | |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 274 ms |
| コンパイル使用メモリ | 71,012 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-25 12:54:26 |
| 合計ジャッジ時間 | 1,274 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}