結果
| 問題 |
No.582 キャンディー・ボックス3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-08-09 09:04:58 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 503 ms |
| コンパイル使用メモリ | 64,388 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-23 04:17:57 |
| 合計ジャッジ時間 | 1,316 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 WA * 6 |
ソースコード
#include<iostream>
using namespace std;
int main(){
int n;
cin >> n;
int c[n];
for(int i = 0; i < n; i++) cin >> c[i];
int two = 0, one = 0;
bool judge = true;
for(int i = 0; i < n; i++){
if(c[i] > 2) judge = false;
else if(c[i] == 1) one++;
else if(c[i] == 2) two++;
}
if(!judge || two > 1 || (two + one)%2 == 1){
cout << "B" << endl;
}else{
cout << "A" << endl;
}
return 0;
}