#C880. Cafeteria Meal Service

    ID: 52822 Type: Default 1000ms 256MiB

Cafeteria Meal Service

Cafeteria Meal Service

In this problem, you are given the total number of meals available in the cafeteria and a list of meal demands from students. Your task is to determine if all meal demands can be exactly fulfilled without exceeding the total number of meals available.

Formally, given an integer \( M \) representing the total meals available and a list of integers \( a_1, a_2, \dots, a_n \) representing the demand from each student, you need to check whether the following inequality holds:

\( \sum_{i=1}^{n} a_i \leq M \)

If the inequality holds, output True; otherwise, output False.

inputFormat

The input is given via standard input (stdin) and consists of two lines:

  1. The first line contains a single integer ( M ) representing the total number of meals available.
  2. The second line contains a space-separated list of integers representing the meal demands of each student. If there are no demands, the second line will be empty.

outputFormat

Output a single line to standard output (stdout) containing either True if all demands can be met, or False otherwise.## sample

10
3 2 5
True