![]() ![]() Some of the rooms have demons to guard that room, so the knight loses health (negative integers) upon entering these rooms other rooms are either empty or contain magic orbs that increase the knight's health (positive integers). ![]() If at any point his health point drops to 0 or below, he dies at that moment. Now the knight has an initial health point represented by a positive integer. Our valiant knight named K was initially positioned in the top-left room and must fight his way through the dungeon to rescue the princess. The dungeon consists of M row, N column grid-like rooms. Suppose there is a story like the demons had captured the princess whose name is P and imprisoned her in the bottom-right corner of a dungeon.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |