結果
問題 |
No.582 キャンディー・ボックス3
|
ユーザー |
![]() |
提出日時 | 2017-10-27 22:24:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 612 bytes |
コンパイル時間 | 663 ms |
コンパイル使用メモリ | 83,472 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-21 21:36:07 |
合計ジャッジ時間 | 1,371 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 15 WA * 2 |
ソースコード
#include <iostream> #include <vector> #include <map> #include <set> #include <queue> #include <string> #include <iomanip> #include <algorithm> #include <cmath> #include <stdio.h> using namespace std; #define int long long int MOD = 1000000007; signed main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; vector<int> A(N); string res; bool f = false; int sum = 0; for (int i = 0; i < N; i++) { cin >> A[i]; if (A[i] >= 2) { f = true; } sum += A[i]; } if (f) { res = "B"; } else { if (sum % 2 == 1) { res = "A"; } else { res = "B"; } } cout << res << endl; }