Algo_扩展gcd、贝祖/裴蜀定理 TODO
作者:互联网
catalog
TODO
__gcd(LL a, LL b, LL& p1, LL& p2){
if(b == 0){
p1 = 1, p2 = 0;
return a;
}
LL _gcd = __gcd(b, a%b, p2, p1);
' [a - (a/b)*b] * p1 + b*p2 = _gcd] '
' a * ? = a*p1 + (a/b)*b*p1 '
' ? = p1 + (a/b)*b*p1/a ' 错!!
}
标签:p2,__,贝祖,gcd,LL,p1,Algo,TODO 来源: https://blog.csdn.net/weixin_42712593/article/details/115643392