結果
| 問題 |
No.582 キャンディー・ボックス3
|
| コンテスト | |
| ユーザー |
mtsd
|
| 提出日時 | 2017-10-27 22:25:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 722 bytes |
| コンパイル時間 | 602 ms |
| コンパイル使用メモリ | 73,660 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 21:37:07 |
| 合計ジャッジ時間 | 1,352 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 15 WA * 2 |
ソースコード
#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;
}
mtsd