不知道为什么我gettion编译错误
prog.cpp: In function 'long long int modInverse(long long int, long long int)':
prog.cpp:46: error: 'extendedEuclid' was not declared in this scope
#include<stdio.h>
#include<utility>
#include<algorithm>
using namespace std;
#define MOD 1000000007
#define LL long long
LL factorial[2000005];
LL pow(LL a, LL b, LL mod) {
LL x = 1, y = a;
while(b > 0) {
if(b%2 == 1) {
x=(x*y);
if(x>mod) x%=mod;
}
y = (y*y);
if(y>mod) y%=mod;
b /= 2;
}
return x;
}
LL modInverse(LL a, LL m) {
return (extendedEuclid(a,m).second.first + m) % m;
}
pair<LL, pair<LL, LL> > extendedEuclid(LL a, LL b) {
if(a == 0) return make_pair(b, make_pair(0, 1));
pair<LL, pair<LL, LL> > p;
p = extendedEuclid(b % a, a);
return make_pair(p.first, make_pair(p.second.second - p.second.first*(b/a), p.second.first));
}
int main()
{
int t,a,b,n,i;
factorial[1]=1;
for (i=2;i<=2000001;i++)
factorial[i]=(factorial[i-1]*i)%(MOD-1);
scanf("%d",&t);
while(t--)
{
scanf("%d%d%d",&a,&b,&n);
LL nCr=((factorial[2*n]%(MOD-1))*(modInverse(factorial[n],(MOD-1))))%(MOD-1);
nCr=((nCr%(MOD-1))*(modInverse(factorial[n],(MOD-1))))%(MOD-1);
LL nCr_pow_c=pow(nCr,b,MOD-1);
LL a_pow_nCr_pow_c=pow(a,nCr_pow_c,MOD);
printf("%lld\n",a_pow_nCr_pow_c);
}
return 0;
}