ll n,r,a[2d5],u[2d5];combination_mint c; { rd(n,(a,(a+1))(n-1)); r+=!u[a[0..n-2]]++; c.init(n--); wt(c.C(n,r)*c.C(n,r-1)/n); }