1021 : The Area of a Sector

时间限制Time Limit 1 Sec 内存限制Memory Limit 128 MB 提交次数Submitted 1 Times 通过次数Solved 1 Times 特判评测Special Judge

题目描述Description

Given a circle and two points on it, calculate the area of the sector with its central angle no more than 180 degrees.

输入格式Input

There are multiple test cases.

Each line contains 6 float numbers denote the center of the circle xc, yc, the two points on the circle x1, y1 and x2, y2.

1 <= xc, yc, x1, y1, x2, y2 <= 10000.

输出格式Output

The area of the sector. The result should be accurated to three decimal places.

样例Sample

提示Hint

With math.h, you could define pi (3.1415926...) as const double pi = acos(-1.0);

Inverse trigonometric function could be obtained by acos, atan, asin, etc..

Be careful that angles like pi in C/C++ are in 3.1415926... type rather than 180.

You’d better use double instead of float. Load double with "%lf" but output it with "%f".

出题Author

CSGrandeur