Binomial Coefficient

This commit is contained in:
Hizenberg
2024-04-10 15:36:18 +05:30
parent 6ddf41feb5
commit bc8374182f
21 changed files with 810 additions and 769 deletions

View File

@@ -1,12 +1,12 @@
//Extended gcd -> Recursive
tuple<int,int,int> extended_gcd( int a, int b){
if( b == 0 ){
return {1,0,a};
}
int x,y,g;
tie(x,y,g) = extended_gcd( b , a%b );
return {y , x - (a/b)*y , g};
//Extended gcd -> Recursive
tuple<int,int,int> extended_gcd( int a, int b){
if( b == 0 ){
return {1,0,a};
}
int x,y,g;
tie(x,y,g) = extended_gcd( b , a%b );
return {y , x - (a/b)*y , g};
}