結果

問題 No.82 市松模様
ユーザー otsnsk
提出日時 2014-12-25 16:46:20
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 342 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 56,212 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-12 22:59:33
合計ジャッジ時間 971 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    string pat = "BWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBWBW";
    int W, H;
    char C;
    cin >> W >> H >> C;

    for (int i = 0; i < H; i++) {
        cout << pat.substr((C=='W')+i%2, W) << "\n";
    }
    
    return 0;
}
0