BZOJ2140:稳定婚姻题解

思路

婚姻关系建男到女的单向边,情人关系建女到男的单向边,求大小为一的强连通分量个数即可。

Leave a Reply

Your email address will not be published. Required fields are marked *