Problem list
Log in
#r03222 · Online Judge > GoldOJ

Is It Sorted?

Bronze III 2.0 s 256 MB

Given $N$ integers, print Ascending if the sequence is non-decreasing, Descending if it is non-increasing, otherwise Mixed. An all-equal sequence counts as Ascending.

Input

Line 1: $N$ ($2 \le N \le 10000$). Line 2: $N$ integers in $[-100000, 100000]$.

Output

Print Ascending, Descending, or Mixed.

Example 1

Input
5
10 20 30 40 50
Output
Ascending

Example 2

Input
4
90 80 80 70
Output
Descending

Example 3

Input
5
10 30 20 50 40
Output
Mixed
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code