結果
| 問題 |
No.582 キャンディー・ボックス3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-27 23:33:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 562 bytes |
| コンパイル時間 | 1,695 ms |
| コンパイル使用メモリ | 166,636 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 23:27:51 |
| 合計ジャッジ時間 | 2,439 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 3 |
ソースコード
#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define RREP(i,a,b) for(int i=(a);i>=(b);i--)
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7, around[]={0,1,1,-1,-1,0,-1,1,0,0};
const ld PI=abs(acos(-1));
int n,one=0,two=0;
ll a;
int main(){
cin >> n;
REP(i,0,n){
cin >> a;
if(a==1) one++;
else if(a==2) two++;
else{
cout << 'B' << endl;
return 0;
}
}
if(two>1) cout << 'B' << endl;
else if(one) cout << (one%2?'A':'B') << endl;
else cout << 'B' << endl;
return 0;
}