QOJ.ac

QOJ

Limite de temps : 2 s Limite de mémoire : 1024 MB Points totaux : 10

#8402. 誰贏了? [C]

Statistiques

Algosia 和 Bajtek 非常喜歡參加演算法競賽(Potyczki Algorytmiczne)。在遠端賽事中,共有 18 道題目需要解決,每道題目可獲得 0 到 10 分。參賽者在排名時,會先根據總得分進行排序。若總分相同,則在更多題目中獲得 10 分的參賽者排名較高;若仍平手,則比較獲得 9 分的題目數量,以此類推。如果透過這種方式仍無法區分參賽者,則判定為平手。

Algosia 和 Bajtek 記得他們在上一屆比賽中所有題目的得分,但他們不記得是誰贏了。你能幫幫他們,寫一個程式讀取他們的得分並判斷誰的名次較高嗎?

輸入格式

第一行輸入包含 18 個範圍在 $[0, 10]$ 之間的整數,代表 Algosia 在各題的得分。

第二行輸入包含 18 個範圍在 $[0, 10]$ 之間的整數,代表 Bajtek 在各題的得分。

輸出格式

輸出僅包含一個單字——「Algosia」或「Bajtek」,代表獲勝者的名字。若為平手,則輸出「remis」。

範例

輸入格式 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

輸出格式 1

Algosia

說明

儘管 Algosia 和 Bajtek 的總得分皆為 161 分,但根據演算法競賽的規則,Algosia 的成績較好。

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.