Type: Default 1000ms 256MiB

练86.3 货币系统

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

说明

给你一个nn种面值的货币系统,求组成面值为mm的货币有多少种方案。

输入格式

第一行为nnmm (n10000,m10000n\leq 10000,m\leq10000)。

接下来 nn 行,每行一个整数 xi,(1xi10000x_i,(1 \le x_i \le10000),表示第 ii 种 货币的面值。

输出格式

一行,方案数。

样例

3 10        
1           
2           
5           
10          

简单背包问题

Not Claimed
Status
Done
Problem
12
Open Since
2026-4-24 0:00
Deadline
2026-5-23 23:59
Extension
24 hour(s)