#C11631. Daily Budget Assessment
Daily Budget Assessment
Daily Budget Assessment
You are given a daily budget \(B\) and \(D\) days. For each day, you are provided with a list of costs incurred at various places visited during that day. Your task is to determine whether the sum of the daily costs is within the budget.
For each day, if the total cost is less than or equal to \(B\), output "YES"; otherwise, output "NO".
Example:
Input: 100 3 4 20 30 10 15 3 40 20 30 2 50 50</p>Output: YES YES YES
inputFormat
The input is read from standard input (stdin) and has the following format:
- The first line contains two space-separated integers: \(B\) (the daily budget) and \(D\) (the number of days).
- Each of the next \(D\) lines begins with an integer \(n\) indicating the number of costs for that day, followed by \(n\) space-separated integers representing the costs incurred on that day.
outputFormat
For each day, output a single line containing "YES" if the total cost for that day is less than or equal to \(B\); otherwise, output "NO".
## sample100 3
4 20 30 10 15
3 40 20 30
2 50 50
YES
YES
YES
</p>