結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
![]() |
提出日時 | 2017-10-27 22:31:38 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,013 bytes |
コンパイル時間 | 1,060 ms |
コンパイル使用メモリ | 91,788 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 21:40:14 |
合計ジャッジ時間 | 1,409 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 6 |
ソースコード
#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; }