#include using namespace std; template vector zaatu(vector &A){ //座標圧縮=Compress. vector B = A; sort(B.begin(),B.end()); B.erase(unique(B.begin(),B.end()),B.end()); for(auto &a : A) a = lower_bound(B.begin(),B.end(),a)-B.begin(); return B; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int move = 0; auto dfs = [&](auto dfs,vector &A) -> void { if(A.size() == 0) return; int m = zaatu(A).size(); vector> Q(m); int n = A.size(); for(int i=0; i one; for(int i=0; i next; next.reserve(sl); for(int i=posl; i next; next.reserve(sr); for(int i=sepa+1; i<=posr; i++){ next.push_back(A.at(i)); Q[A.at(i)].pop_front(); if(Q.at(A.at(i)).size() == 1) one.push(A.at(i)); } posr = sepa-1; dfs(dfs,next); } } }; int N; cin >> N; vector A(N); for(auto &a : A) cin >> a; dfs(dfs,A); if(move%2) cout << "Alice\n"; else cout << "Bob\n"; }