#K15956. Determine List Order
Determine List Order
Determine List Order
You are given an array of integers. Your task is to determine whether the array is in strictly increasing order, strictly decreasing order, or neither. An array is strictly increasing if for every index \(i\) (where \(1 \le i < n\)), the condition \(a_i < a_{i+1}\) holds. Similarly, it is strictly decreasing if for every index \(i\), \(a_i > a_{i+1}\) holds. If the array contains only one element, consider it as strictly increasing.
inputFormat
The input is given via stdin and consists of two lines. The first line contains a single integer \(n\) (the number of elements in the array). The second line contains \(n\) space-separated integers representing the elements of the array.
outputFormat
Print to stdout one of the following strings: INCREASING
, DECREASING
, or NEITHER
, according to the order of the array.
5
1 2 3 4 5
INCREASING