GCC Code Coverage Report


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

test/cpv/aizu-grl/grl_5_a.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/5/GRL/all/GRL_5_A
2 #include "../../../src/graph/ds/alist/lib.hpp"
3 #include "../../../src/tree/dfs/diam/lib.hpp"
4 #include "../../../src/tree/ds/lib.hpp"
5
6 using namespace tifa_libs;
7 32 int main() {
8
1/2
✓ Branch 2 taken 32 times.
✗ Branch 3 not taken.
32 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
9 u32 n;
10
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 std::cin >> n;
11 32 tree<alist<u32>> tr(n);
12
2/2
✓ Branch 0 taken 506858 times.
✓ Branch 1 taken 32 times.
506890 for (u32 i = 1, u, v, w; i < n; ++i) {
13
3/6
✓ Branch 1 taken 506858 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 506858 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 506858 times.
✗ Branch 8 not taken.
506858 std::cin >> u >> v >> w;
14 506858 tr.add_arc(u, v, w), tr.add_arc(v, u, w);
15 }
16
2/4
✓ Branch 2 taken 32 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 32 times.
✗ Branch 6 not taken.
32 std::cout << tree_diam_d(tr) << '\n';
17 32 return 0;
18 32 }
19