Company: Microsoft intern
Difficulty: medium
Car Manufacturing Optimization A car manufacturer has data about the production processes of N different cars (numbered from 0 to N-1) and wants to maximize the number of cars produced in the upcoming month. The manufacturing information is described by an array H, where H[k] denotes the number of hours required to produce the k-th car. There are two assembly lines in the factory, the first of which works for X, and the second Y, hours in a month. Every car can be constructed using either one of these lines. Only one car at a time can be produced on each assembly line and it is not possible to switch lines after starting the car's production. What is the maximum number of different cars that can be produced in the upcoming month? Function Description int solution(vector<int> &H, int x, int y); Write a function that, given an array H of N integers and two integers X and Y, returns the maximum number of different cars that can be produced in the upcoming month by assigning cars to