CT887

The Order Check of the Ashen readings

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Deep in the ember dunes of Ashfall, Ulmar studies rows of readings entries. One clean number will settle the guild's oldest argument. Task: Read n integers and print YES if the array is sorted in non-decreasing order, otherwise NO. Input format: First line: n. Second line: n space-separated integers. Output format: Print YES or NO. Constraints: 1 <= n <= 26; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 20 55 106 119 150 203 275 346 503 505 523 528 611 750 751 772 789 821 828 901 974
Output: YES

Example 2:

Input: 21 623 328 242 184 661 386 677 605 197 882 762 850 705 11 1000 301 623 618 312 612 570
Output: NO

Example 3:

Input: 5 118 609 869 897 970
Output: YES

Constraints:

1 <= n <= 26; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
The Order Check of the Ashen readings - EASY Coding Problem | CodeTikki