Graph Theory37 sections · 1633 units
Open in Course

Problem - School Dance

(CSES 1696)

CSES School Dance: You have nn boys and mm girls. Some boy-girl pairs are willing to dance together. Find the maximum number of boy-girl dance pairs for the school dance. This is a textbook maximum bipartite matching problem.

Boys form one group, girls form the other, and edges represent pairs willing to dance. You will implement Kuhn's algorithm to solve this. Constraints are n,m500n, m \leq 500 with up to 10001000 potential pairs.