715E

「CF715E」Complete the Permutations

\(\text{「CF715E」Complete the Permutations}\) \(\text{Link}\) \(\text{Describe}\) 给定长为 \(n\) 的且部分确定的置换 \(p,q\)。定义 \(p,q\) 距离为通过交换 \(p\) 任意两项变为 \(q\) 的最 ......
Permutations Complete 715E 715 the

CodeForces 715E Complete the Permutations

洛谷传送门 CF 传送门 最小交换次数等于 \(n - \text{环数}\)。所以题目要我们统计把 \(p, q\) 补全成排列,连边 \(p_i \to q_i\),环数 \(= i\) 的方案数。 考虑把边根据 \(p_i, q_i\) 的是否已知状态分成四类: \(p \to q\) \(p ......
Permutations CodeForces Complete 715E 715
共2篇  :1/1页 首页上一页1下一页尾页