Amo La Mia Pizza
All submissions for this problem are available.
The folks of Holumba love their Pizzas !The chefs at Fresh From The Oven are very competitive.
They have 7 types of pizzas available with them.Each of the pizzas requires a different amount of preparation
time and has a unique price.You need to write a program that gives the combination of pizzas that he/she should
bake that will fetch him/her the maximum amount of money.
The details about the pizzas is given below:
type 1 takes 20 mins to make n cost 700
type 2 takes 37 mins to make n cost 1000
type 3 takes 41 mins to make n cost 790
type 4 takes 17 mins to make n cost 290
type 5 takes 29 mins to make n cost 640
type 6 takes 14 mins to make n cost 490
type 7 takes 30 mins to make n cost 710
The chef has x mins to make pizzas.
The amount of time (say x mins)
The output should show the total amount of money (maximum possible) which can be earned within the specified
amount of time.
He/She can make only one pizza of a particular type.
The value of x(user input) must be between 0 and 188 mins.
For input 60 minutes the maximum profit can be obtained baking pizza 1 + pizza 4 + pizza 6.The total sum
obtained is 1480.
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.