Oct-01-2020, 02:04 PM
(This post was last modified: Oct-01-2020, 02:04 PM by Gribouillis.)
You could brute force this by generating all the ways to accomodate the tourists in the empty rooms. For each combination you compute a score which is the smallest distance between two tourists. Finally, you select a combination with the highest score.
When there are many empty rooms and many tourists, you will need to find a more thrifty algorithm.
When there are many empty rooms and many tourists, you will need to find a more thrifty algorithm.