description: Alice and Bob are playing a game. They are given an array A of length N. The array consists of integers. They are building a sequence together. In the beginning, the sequence is empty. In one turn a player can remove a number from the left or right side of the array and append it to the sequence. The rule is that the sequence they are building must be strictly increasing. The winner is the player that makes the last move. Alice is playing first. Given the starting array, under the assumption that they both play optimally, who wins the game?
  
  Input
  
  The first line contains one integer N (1 ≤ N ≤ 2*10^5) - the length of the array A.
  
  The second line contains N integers A_1, A_2,...,A_N (0 ≤ A_i ≤ 10^9)
  
  Output
  
  The first and only line of output consists of one string, the name of the winner. If Alice won, print "Alice", otherwise, print "Bob".
  
  Examples
  
  Input
  
  
  1
  5
  
  
  Output
  
  
  Alice
  
  
  Input
  
  
  3
  5 4 5
  
  
  Output
  
  
  Alice
  
  
  Input
  
  
  6
  5 8 2 1 10 9
  
  
  Output
  
  
  Bob
solution: #include <bits/stdc++.h>
  using namespace std;
  const int maxn = (int)2e5 + 10;
  bool ans;
  int a[maxn];
  int n;
  bool searchLeft() {
    int cnt = 1;
    for (int i = 1; i < n; i++) {
      if (a[i + 1] <= a[i]) break;
      cnt++;
    }
    return cnt & 1;
  }
  bool searchRight() {
    int cnt = 1;
    for (int i = n; i > 1; i--) {
      if (a[i - 1] <= a[i]) break;
      cnt++;
    }
    return cnt & 1;
  }
  int main() {
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    ans = searchRight() || searchLeft();
    if (ans)
      printf("Alice");
    else {
      if (n == 1 || a[1] <= a[n] && a[n - 1] <= a[n] ||
          a[2] <= a[1] && a[n] <= a[1])
        printf("Alice");
      else
        printf("Bob");
    }
    return 0;
  }
  