mirror of
https://github.com/Hizenberg469/Algorithms-snippets.git
synced 2026-04-19 22:52:23 +03:00
Binomial Coefficient
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user