#K88252. Taco Chairs Availability

    ID: 37267 Type: Default 1000ms 256MiB

Taco Chairs Availability

Taco Chairs Availability

You are given the number of chairs in several rows represented by a sequence of integers and an integer representing the number of attendees. Your task is to determine if the total number of chairs is sufficient to seat all the attendees.

Task: Check if the sum of the chairs is greater than or equal to the number of attendees. If yes, output True, otherwise output False.

Formally, let \(C_1, C_2, \ldots, C_n\) be the number of chairs in each row. You need to check if \[ \sum_{i=1}^n C_i \geq A \] where \(A\) is the number of attendees.

inputFormat

The input is read from standard input and has the following format:

  • The first line contains an integer \(n\), the number of rows. (\(n\) can be 0.)
  • The second line contains \(n\) space-separated integers representing the number of chairs in each row. If \(n = 0\), this line will be empty.
  • The third line contains an integer \(A\) representing the number of attendees.

outputFormat

Output to standard output a single line containing True if the total number of chairs is greater than or equal to the number of attendees and False otherwise.

## sample
4
10 20 15 5
50
True