結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
stack9996
|
| 提出日時 | 2015-08-29 17:33:19 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 596 bytes |
| コンパイル時間 | 497 ms |
| コンパイル使用メモリ | 70,352 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-18 15:34:03 |
| 合計ジャッジ時間 | 984 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <iostream>
#include <cstdio>
#include <numeric>
#include <algorithm>
#include <string>
#include <vector>
#include <functional>
#include <cmath>
#include <queue>
#define rep(i, a) FOR(i, 0, a)
#define FOR(i, a, b) for(int i = a; i < b; ++i)
typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int, int> P;
struct edge{ int to, time, cost; };
int main(){
int w, h;
char a;
std::cin >> w >> h >> a;
rep(i, h){
rep(j, w){
std::cout << a;
a = (a == 'W' ? 'B' : 'W');
}
if (w % 2 == 0)a = (a == 'W' ? 'B' : 'W');
std::cout << std::endl;
}
return 0;
}
stack9996