Editorial for COCI '08 Contest 6 #2 Bazen
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.
Submitting an official solution before solving the problem yourself is a bannable offence.
There are six distinct cases, depending on where the given point is – in which of the six labeled parts in the figure. In each of these cases, splitting the triangle in half yields a smaller triangle. We know either the base or height of this smaller triangle from the coordinates of the given point. We can calculate the other length from the known area of the triangle. Finally, from these two numbers, we can calculate the coordinates. It is important to note that all points on the hypotenuse have .
Comments