Computer Science, asked by rutuja29vaidya, 6 months ago

UNLINE EDITUN)
Maximum Prize
Problem Description
Imagine you are a martial arts fighter fighting with fellow martial artists to win prize money. However unlike traditional competitions, here you have the opportunity
to pick and choose your opponent to maximize your prize kitty. The rules of maximization of prize kitty are as follows
You have a superpower bestowed upon you, that you will win against anyone you challenge
You have to choose the right order because unfortunately the superpower does not ensure that your prize money is always the highest
Every victory against an opponent that you challenge and win against, will translate into a certain winning sum
► Here begins the technical part that you need to know in order to maximize your winning prize money
All your opponents are standing in one line next to each other i.e. the order of opponents is fixed
• Your first task is to choose a suitable opponent from this line
When you choose one opponent from that line, he steps out of the line and fights you.
o
• After you beat him, you get to decide how your prize money for winning against him will be calculated
Essentially, if the opponent you have beaten has two neighbours, then you have the option to multiply the opponent number with any one of the two neighbours
and add the other opponent number. Nat value becomes your prize money for that match
. If your opponent has only one neighbor then your prize money for that match is product of current opponent number with neighbours' opponent number
. When dealing with last opponent in the tournament, your prize money is equal to the value of the last opponent number
• As the tournament proceeds, the opponent that you have beaten has to leave the tournament
») ​

Answers

Answered by rit9414635412
4

Answer:

please inbox me sorry sorry

Similar questions