Family Dinner Family Dinner

Dr. Mickhead's family is visiting him next Sunday to have dinner together. He wishes the party to be really special, so he plans to use his best plates for the table setting. Dr. Mickhead has N stacks of plates. Each stack contains K plates. Each plate has a positive beauty value, describing how beautiful it looks. Dr. Mickhead would like to take exactly P plates to use for dinner. If he would like to take a plate from a stack, he must also take all of the plates above it. Help Dr. Mickhead to calculate...

You should be an authorized user in order to see the full description and start solving this mission.