C++ code for bipartite matching on roadmaps