摘要: 错排问题 题意 已知一个长度为 \(n\) 的排列 \(p_1,p_2,\dots,p_n\)。求 \(\forall i \in [1,n]\text{ s.t. }p_i \ne i\) 的方案数。 法1 考虑容斥原理。 因为容斥求的是并集(\(\cup\))但这里求的是交集(\(\cap\)) 阅读全文
posted @ 2025-05-07 21:38 tyh_27 阅读(11) 评论(0) 推荐(0)