結果
問題 | No.82 市松模様 |
ユーザー |
![]() |
提出日時 | 2018-04-08 09:18:52 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 426 bytes |
コンパイル時間 | 559 ms |
コンパイル使用メモリ | 63,348 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 11:12:39 |
合計ジャッジ時間 | 1,048 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <iostream>#include <vector>#include <algorithm>#include <math.h>#define ALL(x) (x).begin(),(x).end()using namespace std;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++){cout << c;c = c == 'B' ? 'W' : 'B';}cout << endl;if(w % 2 == 0)c = c == 'B' ? 'W' : 'B';}return 0;}