GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 18 / 0 / 18
Functions: 100.0% 1 / 0 / 1
Branches: 55.0% 11 / 0 / 20

test/cpv_local/geo2d/minkowski_sum.cf87e.cpp
Line Branch Exec Source
1 // competitive-verifier: LOCALCASE test/cpv_local/_data/codeforces/87E
2
3 #include "../../../src/geo2d/ds/cvh/lib.hpp"
4
5 using namespace tifa_libs;
6 using std::cin, std::cout;
7 using data_t = f128;
8 using Point2 = point<data_t>;
9 using ConvexHull2 = cvh<data_t>;
10
11 const strn RES_YN[2] = {"NO", "YES"};
12
13 5 int main() {
14 u32 a;
15
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
5 cin >> a;
16 5 ConvexHull2 poly(a);
17 5 cin >> poly;
18 5 poly.init();
19 u32 b;
20
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
5 cin >> b;
21 5 ConvexHull2 poly2(b);
22 5 cin >> poly2;
23 5 poly.do_minkowski_sum(poly2.init()).init();
24 u32 c;
25
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
5 cin >> c;
26
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
5 poly2.vs.resize(c);
27 5 cin >> poly2;
28 5 poly.do_minkowski_sum(poly2.init()).init();
29 u32 n;
30
1/2
✓ Branch 1 taken 5 times.
✗ Branch 2 not taken.
5 cin >> n;
31 data_t x, y;
32
2/2
✓ Branch 0 taken 79 times.
✓ Branch 1 taken 5 times.
84 for (u32 i = 1; i <= n; ++i) {
33
2/4
✓ Branch 1 taken 79 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 79 times.
✗ Branch 5 not taken.
79 cin >> x >> y;
34
2/4
✓ Branch 3 taken 79 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 79 times.
✗ Branch 7 not taken.
79 cout << RES_YN[poly.contains(Point2{x * 3, y * 3})] << '\n';
35 }
36 5 }
37