This documentation is automatically generated by online-judge-tools/verification-helper
#include "math/extgcd.hpp"
ll ext_gcd(ll a, ll b, ll &x, ll &y){
ll d = a;
if(b){
d = ext_gcd(b, a % b, y, x);
y -= (a / b) * x;
}else{ x = 1; y = 0; }
return d;
}
#line 1 "math/extgcd.hpp"
ll ext_gcd(ll a, ll b, ll &x, ll &y){
ll d = a;
if(b){
d = ext_gcd(b, a % b, y, x);
y -= (a / b) * x;
}else{ x = 1; y = 0; }
return d;
}