时间复杂度 $O(n!)$
空间复杂度 $O(n^2)$
用一个 match 二维数组先把匹配的对都加好,再 dfs
Last updated 3 years ago
Was this helpful?