#C13941. Warehouse Storage Optimization
Warehouse Storage Optimization
Warehouse Storage Optimization
In a warehouse, each product type requires a specific amount of space per unit, and each storage zone has a maximum capacity. The task is to compute the maximum number of units for each product type that can be stored in the corresponding warehouse zone without exceeding the zone's capacity. For each product type (i), given its space requirement (R_i) and the corresponding zone's capacity (C_i), the maximum quantity is computed as (q_i = \left\lfloor \frac{C_i}{R_i} \right\rfloor). It is guaranteed that the number of product types is equal to the number of zones.
inputFormat
The input is given as three lines:
- The first line contains an integer
n
representing the number of product types (and zones). - The second line contains
n
space-separated integers, where thei-th
integer is the space requirement \(R_i\) of thei-th
product type. - The third line contains
n
space-separated integers, where thei-th
integer is the capacity \(C_i\) of thei-th
zone.
outputFormat
Output a single line containing n
space-separated integers. Each integer represents the maximum number of units of the corresponding product type that can be stored in the respective warehouse zone.
3
1 2 3
5 10 15
5 5 5
</p>