結果
| 問題 |
No.82 市松模様
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-01 18:47:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 562 ms |
| コンパイル使用メモリ | 74,464 KB |
| 最終ジャッジ日時 | 2025-02-20 18:58:58 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 RE * 1 |
| other | AC * 3 RE * 4 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main(){
int n, m;
char s;
cin >> n >> m >> s;
vector<vector<char>> l(n, vector<char>(m, ' '));
for(int i = 0; i < m; i++){
for(int j = 0; j < n; j++){
if ((i + j) % 2 == 0) {
l[i][j] = s;
} else {
l[i][j] = (s == 'B') ? 'W' : 'B';
}
cout << l[i][j];
}
cout << endl;
}
}