結果

問題 No.82 市松模様
ユーザー yuki00130
提出日時 2018-06-09 13:27:36
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 502 ms
コンパイル使用メモリ 54,292 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 12:31:11
合計ジャッジ時間 936 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int w,h;
char c[] = {'W','B'};

int main(){
    char tmp;
    cin >> w >> h >> tmp;
    int i = (tmp == 'W') ? 0 : 1;
    for(int j = 0;j < h;j++){
        for(int k = 0;k < w;k++){
            cout << c[i];
            i = (i + 1)%2;
        }
        cout << endl;
    }
}
0