GCC Code Coverage Report


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

test/cpv/library-checker-enumerative_combinatorics/q_binomial_coefficient_prime_mod.mintd-md.poly_anymod-pmtt.factorial-factl_helper.cpp
Line Branch Exec Source
1 #define AUTO_GENERATED
2 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/q_binomial_coefficient_prime_mod
3 #include "../../../src/comb/qbinom/lib.hpp"
4 #include "../../../src/io/fastin/lib.hpp"
5 #include "../../../src/io/fastout/lib.hpp"
6
7 using namespace tifa_libs;
8 CEXP u32 MOD = 998244353;
9
10 #include "../../../src/fps/ds/mtt/lib.hpp"
11 #include "../../../src/math/ds/mint/md/lib.hpp"
12 #include "../../../src/math/fact/helper_l/lib.hpp"
13
14 using namespace tifa_libs;
15 using mint = mint_md<__LINE__>;
16 using namespace tifa_libs;
17 using poly = polymtt<mint>;
18 using namespace tifa_libs;
19 using fact_t = factl_helper<poly>;
20
21 30 int main() {
22 30 mint::set_mod(MOD);
23 u32 t, mod, q;
24 30 tifa_libs::fin_uint >> t >> mod >> q;
25 30 mint::set_mod(mod);
26
2/2
✓ Branch 0 taken 4 times.
✓ Branch 1 taken 26 times.
30 if (!q) {
27
2/2
✓ Branch 0 taken 3000007 times.
✓ Branch 1 taken 4 times.
3000011 while (t--) {
28 i64 n, k;
29 3000007 tifa_libs::fin_uint >> n >> k;
30
3/4
✓ Branch 0 taken 1916418 times.
✓ Branch 1 taken 1083589 times.
✓ Branch 2 taken 1916418 times.
✗ Branch 3 not taken.
3000007 tifa_libs::fout << !(n < k || k < 0) << '\n';
31 }
32 4 return 0;
33 }
34 26 tifa_libs::qbinom<mint, fact_t> mCn(q);
35
2/2
✓ Branch 0 taken 24000014 times.
✓ Branch 1 taken 26 times.
24000040 while (t--) {
36 i64 n, k;
37 24000014 tifa_libs::fin_uint >> n >> k;
38 24000014 tifa_libs::fout << mCn.qmCn(n, k) << '\n';
39 }
40
41 26 return 0;
42 26 }
43