CF282D.Yet Another Number Game

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Since most contestants do not read this part, I have to repeat that Bitlandians are quite weird. They have their own jobs, their own working method, their own lives, their own sausages and their own games!

Since you are so curious about Bitland, I'll give you the chance of peeking at one of these games.

BitLGM and BitAryo are playing yet another of their crazy-looking genius-needed Bitlandish games. They've got a sequence of nn non-negative integers a1,a2,...,ana_{1},a_{2},...,a_{n} . The players make moves in turns. BitLGM moves first. Each player can and must do one of the two following actions in his turn:

  • Take one of the integers (we'll denote it as aia_{i} ). Choose integer xx (1xai)(1\le x\le a_{i}) . And then decrease aia_{i} by xx , that is, apply assignment: ai=aixa_{i}=a_{i}-x .
  • Choose integer xx . And then decrease all aia_{i} by xx , that is, apply assignment: ai=aixa_{i}=a_{i}-x , for all ii .

The player who cannot make a move loses.

You're given the initial sequence a1,a2,...,ana_{1},a_{2},...,a_{n} . Determine who wins, if both players plays optimally well and if BitLGM and BitAryo start playing the described game in this sequence.

输入格式

The first line contains an integer nn ( 1n31\le n\le 3 ).

The next line contains nn integers a1,a2,...,ana_{1},a_{2},...,a_{n} (0<=ai<300)(0<=a_{i}<300) .

输出格式

Write the name of the winner (provided that both players play optimally well). Either "BitLGM" or "BitAryo" (without the quotes).

输入输出样例

  • 输入#1

    2
    1 1
    

    输出#1

    BitLGM
    
  • 输入#2

    2
    1 2
    

    输出#2

    BitAryo
    
  • 输入#3

    3
    1 2 1
    

    输出#3

    BitLGM
    
首页