Question: I need the answer as soon as possible You will switch on all the funnels at once. Your task now is to perform the following
I need the answer as soon as possible 
You will switch on all the funnels at once. Your task now is to perform the following operations: Select language Select theme Python 3 base16-dark 1. You will shut down only one funnel at a time. 2. You will then empty the container beneath the respective funnel. 1 def mintime(rate, available): # write your code here You will repeat the above steps till all the containers are emptied. 5 def main(): However, once you have switched off a individual funnel you can no longer restart it. It is given that it takes you one second to remove a chocolate ball of any type from the container. Additionally, you are not allowed to empty a container before you switch off the funnel above it. N - int(input()) rate=[None]*N for j in range(N): ratei] - int(input()) 1e 11 12 You need to find the minimum time required to empty all the containers. Since the answer can be very large return it modulo 10^9+7. 13 available=[None) "N for j in range(n): available(j] = int(input()) 14 15 16 Note: 17 result - mintime(rate, available); print(result) _name main": main() 18 i It is mandatory for you to empty the container beneath a funnel after shutting it down before you are allowed to switch off any other funnel. It takes zero seconds for you to shut down a funnel. 19
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
