Back to General discussions forum
I am behind on actually solving the problems created by other folks, but I really wanted to finish putting together this idea. Of all my problems, this is possibly the first one I would not call simple.
Rodion, please check your mailbox.
Vladimir, Hi and thanks a lot for the problem!
Very sorry for missing the message for several days - on occasion I dare to remind about green button below - it would be very good to use it more frequently in such cases (that notification should reach me quickly).
Now I'm very amused to try this one myself, somewhat excited by the introduction above :)
Rodion:
Thanks for posting the problem! Absolutely no issue that it waited in your mailbox. I think I did click the green button, although I'm not entirely certain. Either case, it's all good, and thanks again.
Good luck. :)
V.
I think I did click the green button
well, it may be there was some malfunction, but Clive's notification sent few days earlier worked well :) note that after clicking green button you now are brought to the small form asking to provide some message to be sent as notification (feel free to try)
Huh, "no issue" - just think of our Friends and Colleagues who were bereft of the joy of trying your puzzle for almost a week! :)
Definitely not simple! Advent-of-Code-style solution (for now?): fastest way to get a solution rather than best way to get a fast solution. Thank you!
Vladimir, Thanks for another entertaining problem. I don't know what you had in mind for a solution but I tried the "obvious" approach (not brute force!), expecting it to take a long time. It completed in less than one minute so I was satisfied with that. There may be an elegant solution with a much faster time but I am content to stick with my current one.
Brother Asclepius would probably grumble that the young ones these days, with their huge medicine chests, don't know how tough it was in the olden days, and how solutions with a O(N^5) time and storage complexity wouldn't have cut it back then.
"Medicines aren't random", he'd say. "Learn what you've got. Then you'll know how to use it."
Then he'd shuffle away to work on the draft of his research paper, titled "How the levels of yellow bile influence those of phlegm", which he says would revolutionize medicine. Who knows what that's about.
Vladimir, I had assumed that all but two of the medicines were randomly generated. After your hint I looked at the problem again and saw what I had previously missed. The run time is now around 0.01 seconds and the storage requirements are very small.
Thank you, all, for your kind words and solving efforts.
I took a liberty of adding my own solution.