結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-15 10:17:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 469 bytes |
| コンパイル時間 | 1,487 ms |
| コンパイル使用メモリ | 168,324 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-02 16:39:21 |
| 合計ジャッジ時間 | 5,712 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 46 WA * 17 |
ソースコード
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
int main() {
int n;
cin >> n;
vector<int> a(n);
rep(i, n) cin >> a[i];
int turn = 1;
rep(i, n - 1) if (i == 0 || a[i] == 1) turn = 1 - turn;
if (a[n - 1] > 1 && turn == 1) turn = 0;
else if (a[n - 1] == 1) turn = 1 - turn;
if (turn == 0) cout << "Alice" << endl;
else cout << "Bob" << endl;
return 0;
}