快速幂模板
const int MOD = 1e9+7; int POW(int a,int b) { int ret=1; while(b) { if(b%2) ret=ret*a%MOD; a=a*a%MOD; b=b/2; } return ret; }