test/cpv_local/geo2d/minkowski_sum.loj2549.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: LOCALCASE test/cpv_local/_data/loj/2549 | ||
| 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 | 10 | int main() { | |
| 12 | u32 n, m, q; | ||
| 13 |
3/6✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 10 times.
✗ Branch 5 not taken.
✓ Branch 7 taken 10 times.
✗ Branch 8 not taken.
|
10 | cin >> n >> m >> q; |
| 14 | 10 | ConvexHull2 polya(n), polyb(m); | |
| 15 | 10 | cin >> polya >> polyb; | |
| 16 |
2/2✓ Branch 4 taken 330110 times.
✓ Branch 5 taken 10 times.
|
330120 | for (auto& [x, y] : polyb.vs) { |
| 17 | 330110 | x = -x; | |
| 18 | 330110 | y = -y; | |
| 19 | } | ||
| 20 | 10 | polya.init(); | |
| 21 | 10 | polyb.init(); | |
| 22 | 10 | polya.do_minkowski_sum(polyb).init(); | |
| 23 |
2/2✓ Branch 0 taken 303500 times.
✓ Branch 1 taken 10 times.
|
303510 | flt_ (u32, i, 1, q + 1) { |
| 24 | data_t x, y; | ||
| 25 |
2/4✓ Branch 1 taken 303500 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 303500 times.
✗ Branch 5 not taken.
|
303500 | cin >> x >> y; |
| 26 |
2/4✓ Branch 3 taken 303500 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 303500 times.
✗ Branch 7 not taken.
|
303500 | cout << polya.contains(Point2{x, y}) << '\n'; |
| 27 | } | ||
| 28 | 10 | } | |
| 29 |