#C1419. Check Sorted List

    ID: 43811 Type: Default 1000ms 256MiB

Check Sorted List

Check Sorted List

You are given a list of integers. Your task is to determine whether the list is sorted in non-decreasing order. In other words, for every consecutive pair of elements (a_i) and (a_{i+1}), it should hold that (a_i \leq a_{i+1}). The list may be empty or contain a single element, in which case it is considered sorted. Read the input from standard input and print the result to standard output as either "True" or "False".

inputFormat

The input is given via standard input. The first line contains an integer (n) (the number of elements in the list). If (n > 0), the second line contains (n) space-separated integers. If (n = 0), the list is empty.

outputFormat

Output a single line: "True" if the list is sorted in non-decreasing order, otherwise "False".## sample

5
1 2 3 4 5
True

</p>