You are given three arrays representing the capacities of oxygen tanks, water containers, and food packets, along with the respective requirements of each colonist. Determine the maximum number of colonists that can be sustained with the available resources, given the arrays of oxygen capacities, water capacities, food capacities, oxygen requirements, water requirements, and food requirements.
Explanation: The maximum number of colonists that can be sustained is 2, as we can allocate resources to the first two colonists.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak