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,6 +1,6 @@
//Binary Search Jump.
int ans = n;
for(int b = n/2 ; b >= 1 ; b/=2 ){
while(check(ans - b))ans -= b;
}
//Binary Search Jump.
int ans = n;
for(int b = n/2 ; b >= 1 ; b/=2 ){
while(check(ans - b))ans -= b;
}
cout << ans << endl;