結果

問題 No.582 キャンディー・ボックス3
ユーザー mtsdmtsd
提出日時 2017-10-27 22:25:35
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 722 bytes
コンパイル時間 1,128 ms
コンパイル使用メモリ 73,664 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-05-01 16:25:26
合計ジャッジ時間 1,574 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <utility>
#include <queue>
#include <set>
#include <map>

using namespace std;
typedef  long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
#define  MP make_pair
#define  PB push_back
#define inf  1000000007

long long  mod = 1000000007;


int main(){
	int n;
	cin >> n;
	vector<ll> c(n);
	for(int i=0;i<n;i++){
		cin >> c[i];
	}
	bool flag = 0;
	int x=0;
	for(int i=0;i<n;i++){
		if(c[i]!=1&&c[i]!=0){
			flag = 1;
		}
		if(c[i]==1){
			x++;
		}
	}
	if(flag){
		cout << "B" << endl;
	}else{
		if(x%2==1){
			cout << "A" << endl;
		}else{
			cout << "B" << endl;
		}
	}
	return 0;
}
0