GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 12 / 0 / 12
Functions: 100.0% 1 / 0 / 1
Branches: 70.8% 17 / 0 / 24

test/cpv/aizu-cgl/cgl_1_c.cpp
Line Branch Exec Source
1 // competitive-verifier: PROBLEM https://onlinejudge.u-aizu.ac.jp/courses/library/4/CGL/all/CGL_1_C
2 #include "../../../src/geo2d/cross/lib.hpp"
3 #include "../../../src/geo2d/dot/lib.hpp"
4 #include "../../../src/geo2d/ds/p/lib.hpp"
5 #include "../../../src/geo2d/pred/is_in_middle_p/lib.hpp"
6
7 using namespace tifa_libs;
8 using point_t = point<double>;
9
10 32 int main() {
11
1/2
✓ Branch 2 taken 32 times.
✗ Branch 3 not taken.
32 std::cin.tie(nullptr)->std::ios::sync_with_stdio(false);
12 point_t p0, p1;
13 32 std::cin >> p0 >> p1;
14 u32 q;
15
1/2
✓ Branch 1 taken 32 times.
✗ Branch 2 not taken.
32 std::cin >> q;
16
2/2
✓ Branch 0 taken 12509 times.
✓ Branch 1 taken 32 times.
12541 flt_ (u32, i, 0, q) {
17 point_t p;
18 12509 std::cin >> p;
19
3/4
✓ Branch 2 taken 4994 times.
✓ Branch 3 taken 7515 times.
✓ Branch 5 taken 4994 times.
✗ Branch 6 not taken.
12509 if (is_pos(cross(p0, p1, p))) std::cout << "COUNTER_CLOCKWISE\n";
20
3/4
✓ Branch 2 taken 5462 times.
✓ Branch 3 taken 2053 times.
✓ Branch 5 taken 5462 times.
✗ Branch 6 not taken.
7515 else if (is_neg(cross(p0, p1, p))) std::cout << "CLOCKWISE\n";
21
3/4
✓ Branch 2 taken 1025 times.
✓ Branch 3 taken 1028 times.
✓ Branch 5 taken 1025 times.
✗ Branch 6 not taken.
2053 else if (is_neg(dot(p0, p1, p))) std::cout << "ONLINE_BACK\n";
22
3/4
✓ Branch 1 taken 26 times.
✓ Branch 2 taken 1002 times.
✓ Branch 4 taken 26 times.
✗ Branch 5 not taken.
1028 else if (is_in_middle(p0, p, p1)) std::cout << "ON_SEGMENT\n";
23
1/2
✓ Branch 1 taken 1002 times.
✗ Branch 2 not taken.
1002 else std::cout << "ONLINE_FRONT\n";
24 }
25 32 return 0;
26 }
27