QOJ.ac

QOJ

Límite de tiempo: 1.0 s Límite de memoria: 32 MB Puntuación total: 30

#17018. 音符

Estadísticas

C大调音阶由 8 个音符组成:c d e f g a h C。在本题中,我们用数字 1 到 8 来表示这些音符。音阶可以升序(ascending,从 1 到 8)演奏、降序(descending,从 8 到 1)演奏,或者混合(mixed)演奏。

编写一个程序,在给定音符序列的情况下,判断该音阶是升序、降序还是混合演奏的。

输入格式

输入的第一行也是唯一的一行包含 8 个整数,范围在 1 到 8 之间(含 1 和 8)。每个整数在输入中恰好出现一次。

输出格式

在第一行也是唯一的一行输出中,如果音阶是降序演奏的,则输出 descending;如果是升序演奏的,则输出 ascending;如果是混合演奏的,则输出 mixed

样例

输入样例 1

1 2 3 4 5 6 7 8

输出样例 1

ascending

输入样例 2

8 7 6 5 4 3 2 1

输出样例 2

descending

输入样例 3

8 1 7 2 6 3 5 4

输出样例 3

mixed

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.