QOJ.ac

QOJ

Límite de tiempo: 1 s Límite de memoria: 512 MB Puntuación total: 100

#3383. 糖果店

Estadísticas

小安妮喜欢糖果,她想在当地的糖果店买些糖果。幸运的是,她非常富有,这使她能够买下她想要的所有糖果。她想购买总价至少为 $C$ 克朗的糖果,并且每种类型的糖果最多只能买一个。

购买总价至少为 $C$ 克朗的糖果的方法有很多种,因此她在购买前想先考虑一下各种可能性。由于她的父母认为她还太小,不能使用电脑,所以她请求你编写一个程序来计算这些可能性的数量。

安妮不喜欢像 $1,000,000,007$ 这样的大数字,所以请你计算可能性的数量对 $65537$ 取模后的结果,这是一个不那么令人望而生畏的数字。

输入格式

输入的第一行包含一个整数 $T$,表示测试用例的数量。每个测试用例的第一行包含两个整数 $N$ 和 $C$,分别表示可供选择的糖果种类数和安妮想要花费的最低金额。下一行包含 $N$ 个用空格分隔的整数 $a_i$,表示第 $i$ 种糖果的价格(单位为克朗)。

输出格式

对于每个测试用例,在单独的一行中输出安妮购买总价至少为 $C$ 克朗的糖果的方法数,结果对 $65537$ 取模。

数据范围

  • $0 < T \le 100$
  • $0 < N \le 200$
  • $0 < C \le 10000$
  • $0 < a_i \le 200$

样例

输入格式 1

2
5 10
5 6 7 8 9
10 100
10 10 10 10 10 10 10 10 11 9

输出格式 1

26
1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.