GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 11 / 0 / 11
Functions: 100.0% 1 / 0 / 1
Branches: 83.3% 5 / 0 / 6

test/cpv/library-checker-polynomial/inv_of_polynomials.mints-ms.poly_nttmod-pntt.cpp
Line Branch Exec Source
1 #define AUTO_GENERATED
2 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/inv_of_polynomials
3 #include "../../../src/fps/modinv/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/ntt/lib.hpp"
11 #include "../../../src/math/ds/mint/ms/lib.hpp"
12
13 using namespace tifa_libs;
14 using mint = mint_ms<MOD>;
15 using namespace tifa_libs;
16 using poly = polyntt<mint>;
17
18 18 int main() {
19 u32 n, m;
20 18 tifa_libs::fin_uint >> n >> m;
21 18 poly a(n), b(m);
22 18 tifa_libs::fin_uint >> a >> b;
23 18 auto _ = tifa_libs::modinv_fps(a, b);
24
2/2
✓ Branch 1 taken 1 time.
✓ Branch 2 taken 17 times.
18 if (!_) tifa_libs::fout << "-1\n";
25
2/2
✓ Branch 2 taken 1 time.
✓ Branch 3 taken 16 times.
17 else if (_->is_zero()) tifa_libs::fout << "0\n";
26 16 else tifa_libs::fout << _->size() << '\n'
27
1/2
✓ Branch 2 taken 16 times.
✗ Branch 3 not taken.
16 << _.value() << '\n';
28 18 return 0;
29 18 }
30