結果
| 問題 | No.82 市松模様 |
| コンテスト | |
| ユーザー |
eri
|
| 提出日時 | 2015-07-02 09:36:40 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 261 bytes |
| 記録 | |
| コンパイル時間 | 416 ms |
| コンパイル使用メモリ | 72,536 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-29 13:01:05 |
| 合計ジャッジ時間 | 1,063 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include<iostream>
using namespace std;
int main(){
int w, h; char c;
cin >> w >> h >> c;
int q = ((c == 'B') ? 1 : 0);
for (int y = 0; y < h; y++){
for (int x = 0; x < w; x++){
cout << ((q + y + x) % 2 ? 'B' : 'W');
}
cout << endl;
}
return 0;
}
eri