GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 17 / 0 / 17
Functions: 100.0% 3 / 0 / 3
Branches: 53.6% 15 / 0 / 28

test/cpv/aizu-dsl/dsl_4_a.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/3/DSL/all/DSL_4_A
2 #include "../../../src/geo2d/aunion/pos/lib.hpp"
3
4 using namespace tifa_libs;
5 using point_t = point<f128>;
6 using polygon_t = polygon<f128>;
7
8 50 int main() {
9
1/2
✓ Branch 2 taken 50 times.
✗ Branch 3 not taken.
50 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
10
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
50 std::cout << std::fixed << std::setprecision(0);
11 u32 n;
12
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
50 std::cin >> n;
13 50 vec<polygon_t> pos;
14
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
50 pos.reserve(n);
15
2/2
✓ Branch 0 taken 19598 times.
✓ Branch 1 taken 50 times.
19648 flt_ (u32, i, 0, n) {
16 point_t p1, p2;
17 19598 std::cin >> p1 >> p2;
18
1/2
✗ Branch 1 not taken.
✓ Branch 2 taken 19598 times.
19598 if (p1 > p2) swap(p1, p2);
19
1/2
✓ Branch 4 taken 19598 times.
✗ Branch 5 not taken.
19598 pos.push_back({p1, point_t{p2.x, p1.y}, p2, point_t{p1.x, p2.y}});
20 }
21
1/2
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
415778 std::ranges::sort(pos, less{}, [](auto CR p) { return p.vs; });
22
3/6
✓ Branch 1 taken 50 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 50 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 50 times.
✗ Branch 8 not taken.
39146 auto [l, r] = unique(pos, equal_to{}, [](auto CR p) { return p.vs; });
23
1/2
✓ Branch 3 taken 50 times.
✗ Branch 4 not taken.
50 pos.erase(l, r);
24 50 auto res = aunion_Pos(pos);
25
2/4
✓ Branch 2 taken 50 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 50 times.
✗ Branch 6 not taken.
50 std::cout << res[0] << '\n';
26 50 return 0;
27 50 }
28