結果
| 問題 | 
                            No.82 市松模様
                             | 
                    
| コンテスト | |
| ユーザー | 
                             water
                         | 
                    
| 提出日時 | 2020-03-08 12:58:40 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 3 ms / 5,000 ms | 
| コード長 | 296 bytes | 
| コンパイル時間 | 1,529 ms | 
| コンパイル使用メモリ | 166,312 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-07 00:42:32 | 
| 合計ジャッジ時間 | 2,114 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 7 | 
ソースコード
#include <bits/stdc++.h>
#define INF 990000000
//2
using namespace std;
int main() {
int a,b;
cin>>a>>b;
string s;
cin>>s;
char t;
if(s[0]=='W'){
t='B';
}else{
t='W';
}
for(int i=0;i<b;i++){
for(int j=0;j<a;j++){
if(j%2==0)cout << s[0];
else
cout << t;
}
swap(s[0],t);
cout << endl;
}
}
            
            
            
        
            
water