Medieval Medicine - A Proposed New Problem

Back to General discussions forum

zelevin     2025-09-09 17:27:27

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.

Rodion (admin)     2025-09-15 18:51:11
User avatar

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 :)

zelevin     2025-09-15 19:07:57

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.

Rodion (admin)     2025-09-15 21:09:53
User avatar

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! :)

gardengnome     2025-09-15 21:24:00
User avatar

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!

CSFPython     2025-09-18 20:26:23

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.

zelevin     2025-09-19 00:00:13

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.

gardengnome     2025-09-19 13:58:37
User avatar

Wise words, brother Asclepius.

CSFPython     2025-09-19 20:42:36

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.

zelevin     2025-09-26 20:34:00

Thank you, all, for your kind words and solving efforts.

I took a liberty of adding my own solution.

Please login and solve 5 problems to be able to post at forum