给出两个大小为 nnn 的排列 p,qp,qp,q,你需要求出大小为 nnn 的排列 rrr 的数量,使得 ri≠pi,ri≠qir_i\neq p_i,r_i\neq q_iri=pi,ri=qi。
使用您的 gxyz 通用账户