inline void exgcd(int a,int b,int c){ if(!b){ x=c/a,y=0; return; } exgcd(b,a%b,c); int t=y; y=x-(a/b)*y,x=t; }