#P1705. 爱与愁过火

爱与愁过火

Description

At Pizza Hut, the God of Love and Sorrow was upset and wanted to rip Yue Luo Wu Ti off. He ordered mm dishes, each costing aia_i yuan. Yue Luo Wu Ti planned to spend only nn yuan, so he asked the God of Love and Sorrow to reselect rr dishes from these mm dishes.

Still trying to spend more money, he called you and asked you to write a program to tell him in how many ways he can choose rr dishes from the mm dishes such that the total cost exceeds nn yuan.

Input Format

The first line contains three integers mm, rr, nn.

The second line contains mm integers, where each aia_i is the cost of a dish, separated by spaces.

Output Format

Output a single integer, the total number of valid selections.

5 2 8
1 7 2 5 4
4

Hint

Constraints

For 100%100\% of the testdata, m30m \le 30, rmr \le m, mai90m \le a_i \le 90, n2700n \le 2700.

Translated by ChatGPT 5