It's UWAweek 47

help3001

This forum is provided to promote discussion amongst students enrolled in CITS3001 Advanced Algorithms.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

How do I ask a good question?
Displaying selected article
Showing 1 of 202 articles.
Currently 27 other people reading this forum.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
10:52pm Fri 13th Sep, Mahit G.

The way I thought of solving this problem was similar to the hints, take all the potions if the remaining hp after the potion is less than a sword. If it isn't skip the potion and take a sword. This doesn't seem to work as in some cases, taking lesser damage in the start is actually benificial. I don't understand how to interpret this in a greedy way, when to decide if taking a lower hit is better than a higher, I assumed taking a higher hit would always be better in the start and then take a lower one. 50 1 1 2 30 20 That strategy doesn't seem to work as we would rather have a hit of just 15 in the beginning to get to 15 than to get a hit of 20 and then just get to 21

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy