結果
問題 | No.82 市松模様 |
ユーザー |
|
提出日時 | 2019-08-03 05:32:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 758 bytes |
コンパイル時間 | 1,739 ms |
コンパイル使用メモリ | 165,892 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-05 08:31:11 |
合計ジャッジ時間 | 2,166 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 7 |
ソースコード
#include <bits/stdc++.h>using namespace std;template <class T>void copy(vector<T> from, vector<T> to) {copy(from.begin(), from.end(), back_inserter(to));}template <class T>void sort(vector<T> a) {sort(a.begin(), a.end());}template <class T>void input_to(vector<T> a) {T a_i;cin >> a_i;a.push_back(a_i);}int main() {int w, h;char c;cin >> w >> h >> c;for (int i = 0; i < h; ++i) {for (int j = 0; j < w; ++j) {if (c == 'B') {if ((i + j) % 2 == 0) {cout << "B";} else {cout << "W";}} else {if ((i + j) % 2 == 0) {cout << "W";} else {cout << "B";}}}cout << endl;}cout << endl;}