結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2015-10-01 18:33:55 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 324 bytes |
コンパイル時間 | 1,441 ms |
コンパイル使用メモリ | 158,980 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 18:54:57 |
合計ジャッジ時間 | 1,793 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include "bits/stdc++.h"using namespace std;#define REP(i, n) for(int i=0; i<(n); i++)int W,H;char C;signed main(){cin>>W>>H>>C;char b[2] = {'W','B'};if (C == 'B') swap(b[0],b[1]);REP(y,H) {REP(x,W) {cout << b[(x+y)%2];}cout << endl;}return 0;}