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.

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 P is inside triangle ABC.

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 ABP, ACP and BCP is equal to the area of ABC if and only P is inside ABC.


Comments

There are no comments at the moment.