Source Code
n = int(input())
people = list(map(int,input().split()))
if people == sorted(people):
	print("YES")
else:
	print("NO")
Copy
Anton Can't See (⊙︿⊙)_/¯ acaard
Python 3
119 ms
15.2 MB
Accepted