数字组合
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.
Description
给定 $N$ 个正整数 $A_1,A_2,…,A_N$,从中选出若干个数,使它们的和为 $M$,求有多少种选择方案。
Input Format
第一行包含两个整数 $N$ 和 $M$。
第二行包含 $N$ 个整数,表示 $A_1,A_2,…,A_N$。
Output Format
包含一个整数,表示可选方案数。
4 4
1 1 2 2
3
Hint
数据范围
$1 \le N \le 100$,
$1 \le M \le 10000$,
$1 \le A_i \le 1000$
2025_07_03吉利学院暑假实训周-上机实践-5
- Status
- Done
- Rule
- XCPC
- Problem
- 9
- Start at
- 2025-7-5 14:00
- End at
- 2025-7-5 17:00
- Duration
- 3 hour(s)
- Host
- Partic.
- 26