A. Possible Subscribers↵
↵
Input file: standard input↵
↵
Output file: standard output↵
↵
Time limit: 1 second↵
↵
Memory limit: 256 megabytes↵
↵
MegaMath Channel starts at 0 subscribers. Every day i, the channel gains xi subscribers. Help MegaMath↵
determine whether this is a possible sequence of values of xi (the total number of subscribers must stay↵
≥ 0.)↵
↵
Input↵
↵
The first line contains the number of days n (1 <= n <= 100).↵
The next n lines contain a single integer xi.↵
↵
Output↵
↵
Print "Yes" if the total number of subscribers MegaMath Channel has is, at any given day, >= 0. Otherwise,↵
print "No".
↵
Input file: standard input↵
↵
Output file: standard output↵
↵
Time limit: 1 second↵
↵
Memory limit: 256 megabytes↵
↵
MegaMath Channel starts at 0 subscribers. Every day i, the channel gains xi subscribers. Help MegaMath↵
determine whether this is a possible sequence of values of xi (the total number of subscribers must stay↵
≥ 0.)↵
↵
Input↵
↵
The first line contains the number of days n (1 <= n <= 100).↵
The next n lines contain a single integer xi.↵
↵
Output↵
↵
Print "Yes" if the total number of subscribers MegaMath Channel has is, at any given day, >= 0. Otherwise,↵
print "No".