結果

問題 No.582 キャンディー・ボックス3
ユーザー nanophoto12nanophoto12
提出日時 2017-10-27 22:31:38
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,013 bytes
コンパイル時間 921 ms
コンパイル使用メモリ 91,656 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-01 16:28:21
合計ジャッジ時間 1,546 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 WA -
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
5,376 KB
testcase_11 WA -
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cmath>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <functional>
#include <queue>
#include <iostream>
#include <string.h>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdint>
#include <climits>
#include <unordered_set>
#include <sstream>
#include <stack>

using namespace std;

typedef long long int ll;
typedef pair<ll,ll> pii;
typedef tuple<ll,ll,ll> t3;

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<ll> vs(n);
    int two = 0;
    for(int i = 0;i < n;i++)
    {
        cin >> vs[i];
        if(vs[i] >= 2)
        {
            two++;
        }
    }
    if(!two)
    {
        if(n % 2 == 0)
        {
            cout << "B" << endl;
            return 0;
        }
        cout << "A" << endl;
        return 0;
    }
    if(two >= 2)
    {
        cout << "B" << endl;
        return 0;
    }
    if(n % 2 == 0)
    {
        cout << "A" << endl;
        return 0;
    }
    cout << "B" << endl;
    return 0;
}
0