結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
startcpp
|
| 提出日時 | 2021-05-14 22:54:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 2,000 ms |
| コード長 | 396 bytes |
| コンパイル時間 | 692 ms |
| コンパイル使用メモリ | 65,456 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 03:23:01 |
| 合計ジャッジ時間 | 4,030 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
#include <iostream>
using namespace std;
int n;
int a[200000];
signed main() {
int i;
cin >> n;
for (i = 0; i < n; i++) cin >> a[i];
bool ans = false;
for (i = 0; i < n; i++) {
if (ans == false) {
ans = true;
}
else {
if (a[i] == 1) {
ans = false;
}
else {
ans = true;
}
}
}
if (ans) cout << "Alice" << endl;
else cout << "Bob" << endl;
return 0;
}
startcpp