#C10330. Determine the Sorting Order of a List
Determine the Sorting Order of a List
Determine the Sorting Order of a List
You are given a list of N integers. Your task is to determine the order of the list. The list can be in one of the following orders:
- Non-Decreasing: Each element is less than or equal to the next element. Formally, for all \(i\) such that \(1 \leq i < N\), \(a_i \leq a_{i+1}\).
- Strictly Decreasing: Every element is strictly greater than the next element. That is, for all \(i\) such that \(1 \leq i a_{i+1}\).
- Not Sorted: If the list does not satisfy either of the above conditions.
Your goal is to read the input from standard input (stdin) and print the order of the list to standard output (stdout).
inputFormat
The input is given in two lines from stdin:
- The first line contains an integer \(N\) (the number of elements in the list).
- The second line contains \(N\) integers separated by spaces.
outputFormat
Print a single line to stdout containing one of the following strings:
Non-Decreasing
Strictly Decreasing
Not Sorted
5
1 2 2 3 4
Non-Decreasing