Problem Statement | |||||||||||||
Homes typically have 20 amp fuses in their fuseboxes. Appliances are then hooked up to the fuses. If the appliances connected to a single fuse ever draw more than 20 amps, the fuse will blow (which you would like to avoid). In large homes with a large number of appliances, multiple 20 amp fuses may be required to accommodate all of the appliances. You have a number of large appliances, each of which must be connected to some fuse. The number of amps used by each appliance will be given by amps. Your task is to find the minimum number of 20 amp fuses that can accommodate all of the appliances. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | Each element of amps will be between 1 and 10, inclusive. | ||||||||||||
- | amps will contain between 1 and 10 elements, inclusive. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
|