結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2015-06-11 20:58:07 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 649 ms |
コンパイル使用メモリ | 71,000 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 15:44:14 |
合計ジャッジ時間 | 1,247 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <iostream>#include <algorithm>#include <vector>#include <string>#include <cmath>#include <iomanip>using namespace std;typedef long long LL;int main(){LL W, H;char C;cin >> W >> H >> C;for(int y = 0; y < H; y++){for(int x = 0; x < W; x++){if((x+y) % 2 == 0){cout << C;}else{if(C=='B'){cout << 'W';}else{cout << 'B';}}}cout << endl;}return 0;}