結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2015-07-02 09:36:40 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 261 bytes |
コンパイル時間 | 330 ms |
コンパイル使用メモリ | 54,104 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-07 21:50:26 |
合計ジャッジ時間 | 781 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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;}