Editorial for ICPC SWERC 2017 K - Blowing Candles


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

The narrowest strip touches 3 points of the convex hull, 2 of them being consecutive on the hull

  • Compute and restrict to convex hull in \mathcal O(n \log n)
  • Loop over all consecutive point pairs (a, b)
  • Maintain a point c being furthest from (a, b) in \mathcal O(n) amortized time.

Comments

There are no comments at the moment.