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: 50.0% 8 / 0 / 16

test/cpv/library-checker-graph/enumerate_triangles.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/enumerate_triangles
2 #include "../../../src/graph/cnt/ring3/lib.hpp"
3 // clang-format off
4 #include "../../../src/io/pair/lib.hpp"
5 #include "../../../src/io/container/lib.hpp"
6 // clang-format on
7
8 using namespace tifa_libs;
9 17 int main() {
10
1/2
✓ Branch 2 taken 17 times.
✗ Branch 3 not taken.
17 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
11 u32 n, m;
12
2/4
✓ Branch 1 taken 17 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 5 not taken.
17 std::cin >> n >> m;
13
1/2
✓ Branch 1 taken 17 times.
✗ Branch 2 not taken.
17 vecu x(n);
14 17 std::cin >> x;
15
1/2
✓ Branch 1 taken 17 times.
✗ Branch 2 not taken.
17 vecptu edges(m);
16 17 std::cin >> edges;
17 17 u64 ans = 0;
18 15742394 auto func = [&](u32 u, u32 v, u32 w) { ans = u32((ans + (u128)x[u] * x[v] * x[w]) % 998244353); };
19
1/2
✓ Branch 1 taken 17 times.
✗ Branch 2 not taken.
17 ringenum3(n, edges, func);
20
2/4
✓ Branch 1 taken 17 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 17 times.
✗ Branch 5 not taken.
17 std::cout << ans << '\n';
21 17 return 0;
22 17 }
23