#K52612. Taco Batch Acceptance

    ID: 29349 Type: Default 1000ms 256MiB

Taco Batch Acceptance

Taco Batch Acceptance

This problem involves quality control in a taco production line. You are provided with the number of inspected items, a list indicating whether each item is defective (where 1 represents a defective item and 0 represents a non-defective item), and a threshold \(T\) for the maximum allowed number of defective items. You must determine if the batch should be accepted or rejected. Specifically, if the total number of defective items \(\left(\sum_{i=1}^{N}\text{defective}[i]\right)\) is less than or equal to \(T\), output Accept; otherwise, output Reject.

inputFormat

The input is read from standard input (stdin) and consists of three lines:

  • The first line contains an integer \(N\) representing the number of inspected items.
  • The second line contains \(N\) space-separated integers. Each integer is either 0 (non-defective) or 1 (defective).
  • The third line contains an integer \(T\), which is the maximum number of defective items allowed.

outputFormat

Output a single line to standard output (stdout): print Accept if the sum of the defective items is less than or equal to \(T\), otherwise print Reject.

## sample
6
0 1 0 0 1 0
2
Accept