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 ' 错!!
}
上一篇:cublas fp16


下一篇:ALGO-1 区间k大数查询