結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
![]() |
提出日時 | 2017-11-01 22:23:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 363 bytes |
コンパイル時間 | 467 ms |
コンパイル使用メモリ | 63,360 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-22 14:42:10 |
合計ジャッジ時間 | 1,222 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 8 |
ソースコード
#include <iostream> #define REP(i,a,b) for(int i=(a);i<(b);i++) #define RREP(i,a,b) for(int i=(a);i>=(b);i--) using namespace std; int n,a; int main(){ cin >> n; int t=0,o=0; REP(i,0,n){ cin >> a; if(a>2){cout << 'B' << endl; return 0;} else if(a%2) t++; else o++; } if(t>1) cout << 'B' << endl; else cout << (o%2?'A':'B') << endl; return 0; }