summaryrefslogtreecommitdiff
path: root/math/binomial3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'math/binomial3.cpp')
-rw-r--r--math/binomial3.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/math/binomial3.cpp b/math/binomial3.cpp
deleted file mode 100644
index f52337c..0000000
--- a/math/binomial3.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-ll calc_binom(ll n, ll k, ll p) {
- assert(n < p) //wichtig: sonst falsch!
- if (k > n) return 0;
- ll x = k % 2 != 0 ? p-1 : 1;
- for (ll c = p-1; c > n; c--) {
- x *= c - k; x %= p;
- x *= multInv(c, p); x %= p;
- }
- return x;
-}