結果

問題 No.582 キャンディー・ボックス3
ユーザー GB
提出日時 2018-11-26 22:36:03
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 356 bytes
コンパイル時間 371 ms
コンパイル使用メモリ 57,744 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-11 15:58:47
合計ジャッジ時間 988 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 WA * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>

using namespace std;

int main() {

	int n,count1=0,count2=0;
	cin >> n;
	vector<int> c;

	for (int i = 0;i < n;i++) {
		int buf;
		cin >> buf;
		if (buf == 1)count1++;
		else if (buf == 2)count2++;
	}
	if (count1 % 2 != 0 || count1 % 2 != 0 && count2 == 2)cout << 'A' << endl;
	else cout << 'B' << endl;
	
	return 0;
}
0