結果
問題 | No.82 市松模様 |
ユーザー |
|
提出日時 | 2014-12-03 06:38:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 392 bytes |
コンパイル時間 | 343 ms |
コンパイル使用メモリ | 55,036 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-11 14:41:18 |
合計ジャッジ時間 | 942 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }