Question
You have recently opened a fast-food joint in one of the most crowded markets of your city. Since the area is an expensive one, the
You have recently opened a fast-food joint in one of the most crowded markets of your city. Since the area is an expensive one, the shops are not too large and you have a tight fund to stick to. Through extensive research and surveys, you have identified certain preparations that might work in your area. You need to allocate funds for food preparations. Since different food preparations use different ingredients, their costs differ. Through your surveys and research, you also have an estimate of the profit you might obtain on the given food preparation while remaining competitive in your area. Excluding rent and other utilities, you have a total of 15 lakhs to be allocated to different food preparations for a month. Here your task would be to select as many preparations as possible with the fund constraints such that the total profit is maximized. If there are multiple solutions with the same profit, choose the one which results in maximum utilization of funds and selection of preparations as well, as more variety in food is generally preferred.
Sample Input: For example, if there are 10 different preparations in total and their fund requirements and values are given as shown: Cost C(lakhs) PROFIT P Preparations (i) 1 3 1.7 3.5 3 5.5 4. 1 4 1.3 6.6 6. 1 2
Step by Step Solution
3.53 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
Answer Python Source Code try fopeninputtxt linesfreadlines0 ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started