結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2014-12-02 23:25:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 605 ms |
| コンパイル使用メモリ | 73,452 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 07:42:12 |
| 合計ジャッジ時間 | 1,191 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
using namespace std;
int main(){
int w,h;
char c;
cin >> w >> h >> c;
vector<char> v(2);
if(c=='B'){
v[0] = c;
v[1] = 'W';
}else{
v[0] = c;
v[1] = 'B';
}
for(int i=0; i<h; i++){
for(int j=0; j<w; j++){
cout << v[(i+j)%2];
}
cout << endl;
}
return 0;
}
koyumeishi