Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Dungeon Hunters Mustata wants to cross a dungeon. Dungeon has N cells, and in every cell there are M monsters. To cross each cell he

Dungeon Hunters

Mustata wants to cross a dungeon. Dungeon has N cells, and in every cell

there are M monsters. To cross each cell he has to kill one monster, on

killing the monster,

he loses the strength equal to that of monster and gains some confidence which adds up in his strength and he proceeds to the next cell. Mustafa

can only kill a monster if his strength is greater than or equal to the strength of the monster.

10

11

Help him find the minimum strength he must have in the beginning so

that he can cross N cells.

12 13

14

**CONSTRAINTS:**

15

16

1

1

17

18

1

19

20

21

"FUNCTION DESCRIPTION"

Complete the function 'hunt' in code. Function must return an integer, the

minimum strength required by mustafa to cross the dungeon.

22

23

24

Outpu

in a single w

followed by

elements of

row wise ele

17.8.91 10.1

2312.345

Use custom

hunt' has the following parameter(s):

Input

P. N'M 20 Array, where P[][i] denotes strength of jth monster in ith cell

CN'M 20 Array, where Cilil denotes gain in confidence, hence increase in strength on killing jth monster in ith cELL

N Number of cell

M Number of monsters in each

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

Why does a credit default swap have an option-type payoff?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago