QOJ.ac

QOJ

时间限制: 2 s 内存限制: 1024 MB 总分: 10

#8402. Who won? [C]

统计

Algosia and Bajtek love participating in the Algorithmic Engagements. During the remote rounds, there are 18 tasks to solve, and for each of them, one can score between 0 and 10 points. Participants in the ranking are sorted by the total number of points scored. In the event of a tie, the participant who received 10 points in a greater number of tasks is ranked higher. In the event of a further tie, the participant who scored 9 points in a greater number of tasks is ranked higher, and so on. If it is impossible to distinguish between the participants in this way, a draw is declared between them.

Algosia and Bajtek remember their results on all tasks from the last edition, but they do not remember... who won. Will you help them and write a program that reads their results and says which of them took a higher place?

Input

The first line of input contains 18 integers in the range $[0, 10]$ – Algosia's results on the consecutive tasks.

Similarly, the second line of input contains 18 integers in the range $[0, 10]$ – Bajtek's results on the consecutive tasks.

Output

The only line of output should contain one word – "Algosia" or "Bajtek", indicating the name of the winner. If there was a draw, the word "remis" should be placed there instead of a name.

Examples

Input 1

10 10 7 10 10 10 10 10 10 10 10 10 0 10 4 10 10 10
10 10 10 10 10 10 10 10 10 10 10 10 4 3 4 10 10 10

Output 1

Algosia

Note 1

Although both Algosia and Bajtek scored exactly 161 points, according to the rules of the Algorithmic Engagements, Algosia achieved a better result.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.