标签:style blog color re c div
1 LL Ex_GCD(LL a,LL b,LL &x,LL& y) 2 { 3 if(b==0) 4 { 5 x=1; 6 y=0; 7 return a; 8 } 9 LL g=Ex_GCD(b,a%b,x,y); 10 LL hxl=x-(a/b)*y; 11 x=y; 12 y=hxl; 13 return g; 14 }
扩展欧几里得模板,布布扣,bubuko.com
扩展欧几里得模板
原文地址:http://www.cnblogs.com/tom987690183/p/3853912.html