GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 13 / 0 / 13
Functions: 100.0% 2 / 0 / 2
Branches: 66.7% 8 / 0 / 12

test/cpv/library-checker-number_theory/sum_of_totient_function.min25.mints-ms.cpp
Line Branch Exec Source
1 #define AUTO_GENERATED
2 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/sum_of_totient_function
3 #include "../../../src/nt/mfsum/min25/lib.hpp"
4
5 using namespace tifa_libs;
6 CEXP u32 MOD = 998244353;
7
8 #include "../../../src/math/ds/mint/ms/lib.hpp"
9
10 using namespace tifa_libs;
11 using mint = mint_ms<MOD>;
12
13 354158280 mint f(u64 p, u64 c) {
14 354158280 u64 res = 1;
15
2/2
✓ Branch 0 taken 192993542 times.
✓ Branch 1 taken 354158280 times.
547151822 while (--c) res = res * p;
16 354158280 return res * (p - 1);
17 }
18
19 48 int main() {
20
1/2
✓ Branch 2 taken 48 times.
✗ Branch 3 not taken.
48 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
21 u64 n;
22
1/2
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
48 std::cin >> n;
23
24 48 tifa_libs::min25_sieve<mint, f> min25(n);
25 48 auto h0 = min25.sum_pk(0), h1 = min25.sum_pk(1);
26
2/2
✓ Branch 4 taken 6169208 times.
✓ Branch 5 taken 48 times.
6169256 flt_ (u32, i, 0, (u32)h1.size()) h1[i] -= h0[i];
27
2/4
✓ Branch 1 taken 48 times.
✗ Branch 2 not taken.
✓ Branch 6 taken 48 times.
✗ Branch 7 not taken.
48 std::cout << min25.run(h1) << '\n';
28 48 return 0;
29 48 }
30