#P2347. [NOIP 1996 提高组] 砝码称重
[NOIP 1996 提高组] 砝码称重
Description
Given several weights of , , , , , and (whose total weight is ), how many distinct total weights can be measured?
Input Format
Input: .
(This means there are weights of , weights of , , and weights of .)
Output Format
Output: Total=N.
( is the number of distinct total weights that can be measured using these weights, excluding the case where no weight is used.)
1 1 0 0 0 0
Total=3
Hint
Source: NOIP 1996 Senior Problem 4.
Translated by ChatGPT 5
京公网安备 11011102002149号