0_0_38930299_8243.cpp:6:31: error: expected ')' before ';' token
6 | void exgcd(LL a, LL b, LL &d, LL &x, LL & y, LL MOD) { if (b==0) { d = a; x = 1; y = 0; } else { exgcd(b, a % b, d, y, x, MOD); y -= x * (a / b); } }
| ~ ^
| )
0_0_38930299_8243.cpp:6:32: error: 'd' does not name a type
6 | void exgcd(LL a, LL b, LL &d, LL &x, LL & y, LL MOD) { if (b==0) { d = a; x = 1; y = 0; } else { exgcd(b, a % b, d, y, x, MOD); y -= x * (a / b); } }
| ^
0_0_38930299_8243.cpp:6:43: error: 'x' does not name a type
6 | void exgcd(LL a, LL b, LL &d, LL &x, LL & y, LL MOD) { if (b==0) { d = a; x = 1; y = 0; } else { exgcd(b, a % b, d, y, x, MOD); y -= x * (a / b); } }
| ^
0_0_38930299_8243.cpp:6:56: error: 'y' does not name a type
6 | void exgcd(LL a, LL b, LL &d, LL &x, LL & y, LL MOD) { if (b==0) { d = a; x = 1; y = 0; } else { exgcd(b, a % b, d, y, x, MOD); y -= x * (a / b); } }
| ^
0_0_38930299_8243.cpp: In function 'LL inv(LL, LL)':
0_0_38930299_8243.cpp:7:47: error: too many arguments to function 'void exgcd(LL, LL, LL&)'
7 | LL inv(LL a, LL MOD) { LL d=0, x=0, y=0; exgcd(a, MOD, d, x, y, MOD); return d == 1 ? (x + MOD) % MOD : -1;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
0_0_38930299_8243.cpp:6:6: note: declared here
6 | void exgcd(LL a, LL b, LL &d, LL &x, LL & y, LL MOD) { if (b==0) { d = a; x = 1; y = 0; } else { exgcd(b, a % b, d, y, x, MOD); y -= x * (a / b); } }
| ^~~~~
0_0_38930299_8243.cpp:9:11: error: a function-definition is not allowed here before '{' token
9 | int main(){
| ^
0_0_38930299_8243.cpp:16:2: error: expected '}' at end of input
16 | }
| ^
0_0_38930299_8243.cpp:7:22: note: to match this '{'
7 | LL inv(LL a, LL MOD) { LL d=0, x=0, y=0; exgcd(a, MOD, d, x, y, MOD); return d == 1 ? (x + MOD) % MOD : -1;
| ^
|