Editorial for COCI '07 Contest 5 #3 Jabuke
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.
We are given the formula for the area of a triangle in the problem statement so we only need to find a way to check if a point is inside triangle .
The check can be done in more than one way, one of which only calculates areas of triangles. More precisely, the sum of areas of triangles , and is equal to the area of if and only is inside .
Comments