Under construction

Still being built. Things may change

Dartboard

Time limit1sMemory limit1024 MB

Summary
Given 20 dartboard scores in circular order, print whichever of Alice (aims at 20 and its two neighbors) or Bob (averages all sectors) has the higher expected score, or Tie.
Level

Easy2 of 10

Topics
Array, Math
Solved
No attempts yet

Problem

The dartboard is a circle divided into 2020 sector regions of equal area. Each region has a distinct integer from 11 to 2020 written on it. The picture shows 20,1,18,⋯ ,12,520, 1, 18, \cdots, 12, 5 written clockwise, starting from the region at 12 o'clock. A player who hits one of the 2020 regions earns the score written on it. A real dartboard is more complicated, but this problem uses a board made of only these 2020 sectors, as in the picture.

Alice and Bob each throw one dart at this board. Their strategies and expected scores are as follows.

  • Alice aims at the region with 2020 points. The dart hits that region or one of the two regions next to it. Her expected score is the average of the scores on these three regions.
  • Bob throws at random. The dart hits one of the 2020 regions. His expected score is the average of the scores on all 2020 regions.

For example, with the score layout in the picture, Alice's expected score is 5+20+13=8.666…\frac{5+20+1}{3} = 8.666\dots and Bob's expected score is 20+1+⋯+520=10.5\frac{20+1+\cdots+5}{20} = 10.5. Bob's strategy is better in this case.

Input

The first line contains the 2020 scores on the board, separated by spaces. The scores are listed clockwise, starting from the region at 12 o'clock. They are 2020 distinct integers from 11 to 2020.

Output

Print the name of the player whose expected score is higher when Alice and Bob each throw one dart. If the two expected scores are equal, print Tie.

Examples2

  1. Example 1

    Input
    20 1 18 4 13 6 10 15 2 17 3 19 7 16 8 11 14 9 12 5
    
    Expected output
    Bob
    
  2. Example 2

    Input
    1 20 11 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19
    
    Expected output
    Alice