結果

問題 No.1506 Unbalanced Pocky Game
ユーザー GRMNGRMN
提出日時 2021-06-20 21:14:53
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,278 bytes
コンパイル時間 4,181 ms
コンパイル使用メモリ 267,260 KB
実行使用メモリ 8,780 KB
最終ジャッジ日時 2023-09-05 01:35:43
合計ジャッジ時間 8,269 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 5 ms
4,380 KB
testcase_14 AC 10 ms
4,376 KB
testcase_15 AC 9 ms
4,384 KB
testcase_16 AC 21 ms
4,380 KB
testcase_17 AC 11 ms
4,380 KB
testcase_18 AC 8 ms
4,380 KB
testcase_19 AC 7 ms
4,380 KB
testcase_20 AC 22 ms
4,380 KB
testcase_21 AC 9 ms
4,384 KB
testcase_22 AC 15 ms
4,380 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 29 ms
4,376 KB
testcase_26 AC 95 ms
8,328 KB
testcase_27 AC 96 ms
8,592 KB
testcase_28 AC 93 ms
8,380 KB
testcase_29 AC 94 ms
8,444 KB
testcase_30 AC 98 ms
8,780 KB
testcase_31 AC 97 ms
8,708 KB
testcase_32 AC 96 ms
8,500 KB
testcase_33 AC 91 ms
8,380 KB
testcase_34 AC 91 ms
8,428 KB
testcase_35 AC 90 ms
8,644 KB
testcase_36 AC 2 ms
4,376 KB
testcase_37 AC 1 ms
4,380 KB
testcase_38 AC 2 ms
4,380 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 2 ms
4,380 KB
testcase_41 AC 2 ms
4,376 KB
testcase_42 AC 1 ms
4,376 KB
testcase_43 AC 2 ms
4,380 KB
testcase_44 AC 2 ms
4,376 KB
testcase_45 AC 1 ms
4,376 KB
testcase_46 AC 30 ms
5,128 KB
testcase_47 AC 10 ms
4,376 KB
testcase_48 AC 14 ms
4,380 KB
testcase_49 AC 36 ms
5,396 KB
testcase_50 AC 31 ms
5,192 KB
testcase_51 AC 34 ms
5,232 KB
testcase_52 AC 26 ms
4,820 KB
testcase_53 AC 42 ms
6,028 KB
testcase_54 AC 15 ms
4,384 KB
testcase_55 AC 11 ms
4,384 KB
testcase_56 AC 10 ms
4,384 KB
testcase_57 AC 30 ms
5,328 KB
testcase_58 AC 10 ms
4,376 KB
testcase_59 AC 7 ms
4,376 KB
testcase_60 AC 19 ms
4,448 KB
testcase_61 AC 29 ms
5,008 KB
testcase_62 AC 24 ms
4,688 KB
testcase_63 AC 17 ms
4,504 KB
testcase_64 AC 34 ms
5,244 KB
testcase_65 AC 18 ms
4,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define all(v) begin(v),end(v)
#define rall(v) rbegin(v),rend(v)
#define fi first
#define se second
#define re0 return 0
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using tup = tuple<ll, ll, ll>;
using cp = complex<double>;
constexpr ll inf = 2e9;
constexpr ll llinf = 9e18;
//constexpr ll MOD = 998244353;
constexpr ll MOD = 1000000007;
const double pai = acos(-1);

int main() {
    //cout<<fixed<<setprecision(15);
    int n;cin>>n;
    vector<int> a(n);
    map<int,int> mp;
    rep(i,n){
        cin>>a[i];
        mp[a[i]]++;
    }
    if(mp[1]==0){
        cout<<"Alice"<<endl;
        re0;
    }
    if(mp[1]==n){
        if(n%2)cout<<"Alice"<<endl;
        else cout<<"Bob"<<endl;
    }
    reverse(all(a));
    int cr=0;
    rep(i,n){
        if(a[i]!=1)break;
        cr^=1;
    }
    if(!cr)cout<<"Alice"<<endl;
    else cout<<"Bob"<<endl;
}
0