Maximum cardinality matching on bipartite graph.
Source set to 0 and sink m+n+1, add edges from source to all points in the path and from interests to sink. Between path points and interest points, add an edge when the distance of travel by the dog is no larger than twice the length to the next point on the path.
WA: not sure why...
Maximum cardinality matching on bipartite graph. Source set to 0 and sink m+n+1, add edges from source to all points in the path and from interests to sink. Between path points and interest points, add an edge when the distance of travel by the dog is no larger than twice the length to the next point on the path. WA: not sure why...