#C2468. Production Time Verification

    ID: 45787 Type: Default 1000ms 256MiB

Production Time Verification

Production Time Verification

You are given a production process where n items are produced sequentially. Each item requires a time given in the list production_times. Your task is to determine if at least k items can be produced within a maximum allowed time of t units.

The production process is formalized as follows: Given production times \(p_1, p_2, \dots, p_n\), let the cumulative time \(T_m = \sum_{i=1}^{m} p_i\). If there exists an integer \(m \ge k\) such that \(T_m \le t\), then the answer is "Yes", otherwise it is "No".

inputFormat

The input consists of two lines. The first line contains three integers separated by spaces: n (the total number of items), k (the required number of items), and t (the maximum allowed time).

The second line contains n space-separated integers representing the production times for each item in order.

outputFormat

Output a single line containing either "Yes" if at least k items can be produced within the allowed time, or "No" otherwise.

## sample
5 3 10
2 3 5 7 1
Yes

</p>