Company: Infoedge_5april
Difficulty: medium
Apple Gathering Mission Problem Description John loves apples and is determined to harvest them from his neighbor's garden. However, there's a time constraint - John must complete his apple-gathering mission before the neighbor returns, which will be after H hours. There are n apple trees in the garden, each with a different yield of apples denoted by apples[i] . John can pick m apples per hour. If a tree has fewer than m apples, John will move on to the next tree. Your task is to determine the smallest value of m that allows John to gather as many apples as possible under the given conditions without alerting the neighbor. Input format The initial line specifies an integer n , denoting the quantity of apple trees. Subsequently, in the following sequential lines, the array elements of apples are presented, where apples[i] signifies the count of apples on the i th apple tree. The next line contains H hours, which is the time frame after which the neighbor will visit his garden. Output f