結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
![]() |
提出日時 | 2017-11-01 22:24:05 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 624 ms |
コンパイル使用メモリ | 63,972 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-22 14:42:16 |
合計ジャッジ時間 | 1,179 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 WA * 4 |
ソースコード
#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; }