結果
問題 | No.82 市松模様 |
ユーザー |
|
提出日時 | 2023-01-03 17:46:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 558 bytes |
コンパイル時間 | 1,855 ms |
コンパイル使用メモリ | 165,772 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 02:20:00 |
合計ジャッジ時間 | 2,511 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int a,b; char c; cin>>a>>b>>c; for(int i=0;i<b;i++){ for(int j=0;j<a;j++){ if(c=='W'){ if((i+j)%2==0){ cout<<'W'; } else{ cout<<'B'; } } else if(c=='B'){ if((i+j)%2==0){ cout<<'B'; } else{ cout<<'W'; } } } cout<<endl; } }