A geometric algorithm that finds the maximum possible length of the common boundary of two polygons when they are optimally placed.
Problem Source: ACM-ICPC World Finals 2016
A Rust solution for the Polygonal Puzzle problem.
Results are converted into SVG. Example:
Run all tests manually (it uses the official test data):
cargo run --release < tests/data/input
Or compare output using cpdiff:
cargo run --release < tests/data/input | cpdiff tests/data/output
cargo fmt
touch src/main.rs && touch src/lib.rs && cargo clippy
cargo test
Another solution in C++ is here.