Editorial for Wesley's Anger Contest 2 Problem 4 - The Ninth Triangle of the Underworld
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
This problem is asking you to minimize the area of the union of two triangles given that you can translate the triangles to any location, and you can reflect the triangles, with the added restriction that one side of one triangle must lie on the same line as one side of the other triangle. Finding the area of the union of two triangles is equivalent to finding the area of the intersection subtracted from the total area of the two triangles separately.
Since there are only
Special care should be taken to ensure that floating point calculations are done accurately.
Time Complexity:
Comments