問題一覧 > 通常問題

No.1238 Selective Class

レベル : / AI推定難易度 : 1050 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 225
作問者 : piddy / テスター : platinum
お気に入りにしたユーザー ProblemId : 5169 / 自分の提出
問題文最終更新日: 2020-09-08 12:58:07
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 267 (順位表) の他の問題:

Problem Statement

A cram school has $N$ students, and the score of the $i$-th student on an achievement test is $A_i$. From these $N$ students, at least $1$ student will be chosen to form a selective class. However, the following condition must be satisfied.

  • The average achievement test score of the students chosen for the selective class is at least $K$ points.
How many ways are there to choose the students for the selective class? Find the count modulo $10^9 + 7$.

Input

$N\ K$
$A_1\ A_2\ \dots\ A_N$

  • $1 \le N \le 100$
  • $0 \le K \le 100$
  • $0 \le A_i \le 100\ (1 \le i \le N)$
  • All input values are integers.

Output

Print the answer on $1$ line, followed by a newline.

Sample

Sample 1
Input
2 2
1 3
Output
2

If only student $1$ is chosen, the average score of the selective class is $1$ point.
If only student $2$ is chosen, the average score of the selective class is $3$ points.
If student $1$ and student $2$ are chosen, the average score of the selective class is $2$ points.
Thus, there are $2$ ways to choose the students so that the average score of the selective class is at least $2$ points, so print $2$.

Sample 2
Input
3 14
15 9 26
Output
5

Sample 3
Input
9 12
25 48 7 36 28 35 82 43 5
Output
508

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。