ll quickpow(ll a,ll b,ll p) //(a^b)%p { ll res=1%p; a%=p; while(b!=0) { if(b&1) res=(res*a)%p; a=(a*a)%p; b>>=1; } return res; }
long double quickmi(long double a,int b) { long double t=1; for (; b; b>>=1,a=a*a) if (b&1) t=t*a; return t; }