結果
問題 | No.82 市松模様 |
ユーザー |
|
提出日時 | 2020-07-05 15:48:22 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 586 bytes |
コンパイル時間 | 616 ms |
コンパイル使用メモリ | 72,632 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-22 13:02:54 |
合計ジャッジ時間 | 1,203 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <algorithm>#include <cmath>#include <cstdio>#include <deque>#include <iostream>#include <map>#include <numeric>#include <queue>#include <set>#include <stack>#include <string>#include <vector>using namespace std;typedef long long ll;#define MOD 1000000007int main() {int w, h;cin >> w >> h;char c;cin >> c;for (int i = 0; i < h; ++i) {for (int j = 0; j < w; ++j) {if ((i + j) % 2 == 0) {cout << (c == 'B' ? 'B' : 'W');} else {cout << (c == 'B' ? 'W' : 'B');}}cout << endl;}return 0;}