Company: Zorvyn SDE_4april
Difficulty: medium
10 marks 2s limit 256MB Problem Statement Alice and Bob are facing off in a stone-picking game. There are N piles of stones, with pile i holding A[i] stones. They alternate turns, Alice going first. On each turn, whoever's turn it is must: Pick a pile that still has stones in it. Take away somewhere between 1 stone and half the pile (rounded down). Exception: if a pile is down to exactly 1 stone, that 1 stone must be taken. Whoever takes the very last stone from the very last pile wins the game. Assuming both players play as well as possible, work out who comes out ahead. Input Format First line contains a single integer N. Second line contains N space-separated integers A[1], A[2], ..., A[N] . Output Format Print "Alice" if Alice wins, "Bob" if Bob wins. Constraints 1 1 Examples Example 1 Input: 1 1 Output: Alice Explanation: Alice takes the only stone and wins. Example 2 Input: 1 2 Output: Bob Explanation: Alice can only take 1 stone (half of 2, rounded down). Bob takes the remaining