Loading...
Loading...
Loading...
A warehouse logs the weights of parcels as they pass a scanner. Print YES if the weights never decrease from one parcel to the next, and NO otherwise.
Example 1
Input
1 2 2 5
Output
YES
Example 2
Input
3 1 2
Output
NO
Try the problem first. Open one hint at a time.
Compare each item with the one before it.
Equal neighbours are allowed.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor