#Lutece0804. Lovely Calculus
Lovely Calculus
Migrated from Lutece 804 Lovely Calculus
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Parabola is very important in math, I believe every one of you should be very familiar with that.
A parabola on a plane can be expressed as () (Well, you can see we have simplified the problem a little bit...)
In this problem, a point is said to be "inside a parabola", if such conditions holds:
If , then .
If , then .
Given two parabolas, one with , the other with , you need to find the intersection
of two parabolas. Which is the area made up by all the points which are inside both parabolas.
Input
The test contains two lines, the first line with three numbers , given a parabola .
The second line comes three numbers , given a parabola
$-100\leq a_{1}, b_{1}, c_{1}, a_{2}, b_{2}, c_{2}\leq 100, a_{1}a_{2} < 0$.
Output
Output the area of intersection, rounded to digits after decimal point.
Samples
8 -10 3
-5 7 2
3.598
Note
You can use printf("%.3f\n")
to output the answer
Resources
the 12th UESTC Programming Contest Preliminary