407226: GYM102697 197 Three Lines
Description
You're given three lines on the coordinate plane. No pairs of the lines are parallel.
Figure out the area of the triangle formed by the intersection points of the three lines. In other words, label the points of interesection of lines 1 and 2, lines 1 and 3, and lines 2 and 3, $$$A$$$, $$$B$$$, and $$$C$$$, respectively. Then, your task is to find the area of triangle $$$ABC$$$.
InputThe input consists of three lines, each containing the equation for one of the lines, in $$$y = mx + b$$$ form, where $$$m$$$ represents the slope of the line, and $$$b$$$ represents the y-intercept of the line.
OutputOutput a single decimal number representing the area of the triangle formed by the intersection points of the three lines. Do not round your answer. Your answer doesn't have to be exactly equal to ours; as long as it's within a few decimal places it will be judged as correct.
ExamplesInputy = 2x + 3 y = -2x + 9 y = x - 2Output
28.166666666666664Input
y = 2x + 3 y = -2x + 9 y = -x - 27Output
793.5000000000001Input
y = 2x + 3 y = -2x + 90 y = 7x - 2Output
478.4027777777778Note
Here is the graph of the first example case: