結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
![]() |
提出日時 | 2018-01-21 16:57:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 419 bytes |
コンパイル時間 | 851 ms |
コンパイル使用メモリ | 82,900 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 21:17:04 |
合計ジャッジ時間 | 1,885 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 16 WA * 1 |
ソースコード
#include <cmath> #include <string> #include <vector> #include <iomanip> #include <iostream> #include <algorithm> #include <functional> using namespace std; int n, a; int main() { cin >> n; int c2 = 0; long long cnt = 0; for (int i = 0; i < n; i++) { cin >> a; cnt += a; if (a >= 2) c2++; } if (cnt % 2 == 0) cout << "B" << endl; else if (c2 >= 2) cout << "B" << endl; else cout << "A" << endl; return 0; }