Type: Default 1000ms 256MiB

体积

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.

问题描述

给出 n 件物品,每件物品有一个体积 ViV_i,求从中取出若干件物品能够组成的不同的体积和有多少种可能。

输入

第 1 行 1 个正整数,表示 n。 第 2 行 n 个正整数,表示ViV_i,每两个数之间用一个空格隔开。

Output

一行一个数,表示不同的体积和有多少种可能。(忽略体积为0情况)

Samples

3 
1 3 4
6

Limitation

对于 30% 的数据满足:n≤5,1≤ViV_i ≤10。 对于 60% 的数据满足:n≤10,1≤ViV_i ≤20。 对于 100% 的数据满足:n≤20,1≤ViV_i≤50。

2.22

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
6
Start at
2025-2-22 19:00
End at
2025-2-25 7:00
Duration
60 hour(s)
Host
Partic.
4