結果
| 問題 | 
                            No.82 市松模様
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-08-13 09:56:37 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 579 bytes | 
| コンパイル時間 | 849 ms | 
| コンパイル使用メモリ | 80,952 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-07 16:05:31 | 
| 合計ジャッジ時間 | 1,151 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 7 | 
ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int main(){
	string r="BW";
	int w,h;
	char t;
	cin>>w>>h>>t;/*
	for(int i=0;i<70;i++){
		if(i%2)r[i]='W';
		else r[i]='B';
	}
	*/
	int y=0;if(t=='W')y++;
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			if((y+j)%2)cout<<r[1];
			else cout<<r[0];
		}
		y++;
		cout<<endl;
	}
	return 0;
}