結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
siguma323
|
| 提出日時 | 2016-05-18 13:05:54 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 609 bytes |
| コンパイル時間 | 1,548 ms |
| コンパイル使用メモリ | 64,328 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-06 05:28:46 |
| 合計ジャッジ時間 | 1,009 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 |
ソースコード
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <fstream>
#include <queue>
#include <cstring>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<ll,ll>;
int main()
{
char gara[2] = {'B','W'};
int w,h;
char c;
cin >> w >> h >> c;
int index = 0;
if(c == 'W')
index = 1;
int tmp_index = index^1;
for(int y = 0; y < h; ++y)
{
for(int x = 0; x < w; ++x)
{
cout << gara[index];
index ^= 1;
}
index = tmp_index;
tmp_index = index^1;
cout << endl;
}
}
siguma323