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