Hey, I have been trying to solvethis problem but I am unable to figure out how to solve it even after checking other’s code.

# Need help in Noob Farmer

**udayan14**#2

This is essentially a geometry problem. You need to calculate the area of the entire triangle given the areas of triangles UPZ, ZPW and WPY. Let the areas of triangles UPX, XPV and VPY be x, y and z respectively. We just need to now solve for these variables. One well known formula for the area of a triangle is 0.5 x base x height. We will be basically using this formula.

Triangles VPY and WPY have the same height, thus the ratio of their areas is VY : YW.

Similarly the ratio of areas of triangles UVY and UWY is also VY : YW by the same logic.

We thus have one equation in x, y and z. Get two more such equations and then solve.

Hope this helps

Another thing is that you don’t need to explicitly solve for x, y and z. You only need to calculate x + y + z.