need help on instructions of problem 214 the sick travellers

Back to General discussions forum

Alyamepi     2019-09-18 06:27:28

Hi, I am trying to solve nr. 214, but apparently I misinterpret the instructions. When I solve the example case by hand, I get a different solution than the one given. My code gives the same solution as manual. In order to find the difference, I would like to see each of the 10 steps, because from the end result, I can't trace where the
difference occurs.

Thanks for your help.

Wojciech Morawiec     2019-09-19 08:12:52

A sick person always becomes recovering the next day and a recovering person always becomes healthy the next day.

A healthy person stays a healthy person, unless they were in a city with a sick or recovering person the day before.

Applying those rules I can validate that Andy and Pat are the last two sick guys on day 10 (in XPU - Alf and Irv, who are both recovering in KSB, are quarantined there). After that, they both go to JBK where they become recovering and since nobody else is there with them, everyone is healthy on day 12.

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