結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-15 15:59:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 2,000 ms |
| コード長 | 590 bytes |
| コンパイル時間 | 2,104 ms |
| コンパイル使用メモリ | 195,920 KB |
| 最終ジャッジ日時 | 2025-01-21 12:59:21 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
/**
* author: shu8Cream
* created: 15.05.2021 13:04:22
**/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(n); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using ll = long long;
using P = pair<ll,ll>;
using vi = vector<ll>;
using vvi = vector<vi>;
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int n; cin >> n;
vi a(n); rep(i,n) cin >> a[i];
bool win = 1;
rep(i,n-1){
if(a[i+1]==1) win^=1;
else win = 1;
}
cout << (win ? "Alice" : "Bob") << endl;
}