Skip to content
C

Check if an Array is Sorted

Easyjavapythonccppjavascript

Given an array of N integers, determine whether its elements are arranged in non-decreasing order.

Input Format

The first line contains an integer N. The second line contains N space-separated integers.

Output Format

Print 1 if the array is sorted in non-decreasing order, otherwise print 0.

Input (stdin)

Output

Run your code to see output here...