← 返回 amazon 的题目列表Minimum Trucks for Product Shipping
类型:online_judge
amazon
In the daily global shipping operations, different types of products are transported to various locations. Given several quantities of different product types, trucks have capacity limits and maximum load limits for the same type of products. Write a program to calculate the minimum number of trucks required to transport all the products.
Input Format:
The first line contains two integers, n for the number of product types
The next n lines each have one integer, representing the quantity of each product type
The next two integers, capacity for the truck capacity limit, and max_parcels_of_same_type for the maximum number limit of the same product type
Output: Output one integer, the minimum number of trucks required.
Test Cases:
Example Case 1:
Input:
3
1
2
3
3
3
Output:
3
Example
Input
3
1
2
3
3
3