#include <cstdio> #define LL long long LL finmo=; LL fac[][],inv[][]; LL tmp[],rev[]; LL n,g,x,y; ]={,,,}; LL qpow(LL bas,LL pow,LL mo){ LL ret=; ){ ) ret*=bas,ret%=mo; } return(ret); }//快速幂 LL C(LL t1,LL t2,LL mopo){ ); return((fac[mopo][t1]*inv[mo…