結果

問題 No.582 キャンディー・ボックス3
ユーザー eSeF
提出日時 2020-11-06 11:32:05
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,485 bytes
コンパイル時間 976 ms
コンパイル使用メモリ 117,816 KB
最終ジャッジ日時 2025-01-15 20:01:53
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<iomanip>
#include<limits>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<stack>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
#include<numeric>
#include<unordered_set>
#include<unordered_map>
#include<complex>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const ll infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
#define rep(i,n) for (int i=0; i < (n); i++)
typedef double D;      // 座標値の型。doubleかlong doubleを想定
typedef complex<D> P;  // Point
typedef pair<P, P> L;  // Line
typedef vector<P> VP;
const D EPS = 1e-9;    // 許容誤差。問題によって変える
#define X real()
#define Y imag()
#define LE(n,m) ((n) < (m) + EPS)
#define GE(n,m) ((n) + EPS > (m))
#define EQ(n,m) (abs((n)-(m)) < EPS)
D dot(P a, P b) {
  return (conj(a)*b).X;
}
int main(){
    cout << fixed << setprecision(10);
    int N;
    cin >> N;
    vector<int>C(N);
    rep(i,N)cin >> C[i];
    ll sm=0;
    rep(i,N)sm+=C[i];
    if(sm%2==0){
        cout << "B" << endl;
    }
    else{
        int c=0;
        rep(i,N){
            if(C[i]>=3){
                cout << "B" << endl;
                return 0;
            }
            if(C[i]>=2)c++;
        }
        if(c>=2)cout << "B" << endl;
        else cout << "A" << endl;
    }
    return 0;
}
0