New answers tagged

1

You can use the assignment problem. Construct a bipartite graph, where one side corresponds to students, and the other side corresponds to spots in cities: if a city has $n$ spots, there will be $n$ vertices corresponding to the city. If student $x$ is interested in city $y$, connect $x$ to all spots of $y$ with an edge whose weight corresponds to the "...


Top 50 recent answers are included