GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 8 / 0 / 8
Functions: 100.0% 1 / 0 / 1
Branches: 100.0% 4 / 0 / 4

test/cpv/library-checker-enumerative_combinatorics/binomial_coefficient_prime_mod.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/binomial_coefficient_prime_mod
2 #include "../../../src/comb/binom/lib.hpp"
3 #include "../../../src/io/fastin/lib.hpp"
4 #include "../../../src/io/fastout/lib.hpp"
5 #include "../../../src/math/ds/mint/md/lib.hpp"
6
7 using namespace tifa_libs;
8 using mint = mint_md<__LINE__>;
9
10 20 int main() {
11 u32 t, MOD;
12 20 fin_uint >> t >> MOD;
13 20 mint::set_mod(MOD);
14 20 binom<mint> mCn(10'000'001);
15
2/2
✓ Branch 0 taken 18000007 times.
✓ Branch 1 taken 20 times.
18000027 while (t--) {
16 i64 n, k;
17 18000007 fin_uint >> n >> k;
18
2/2
✓ Branch 0 taken 10000007 times.
✓ Branch 1 taken 8000000 times.
18000007 fout << (MOD < 1e7 ? mCn.lucas(n, k) : mCn.mCn(n, k)) << '\n';
19 }
20 20 return 0;
21 }
22