Problem A
Circum Triangle
Input: Standard Input
Output: Standard Output
You will be given N distinct points on the boundary of a circle whose center is at the origin. As the points are on the same circle no three of them are collinear, so any three of them creates a valid triangle. Your job is to find the summation of areas of these nc3 triangles.
Input file contains at most 16 sets of inputs. The description of each set is given below:
Each set starts with two integers
N (0 ≤ N ≤ 500) and R(0<R ≤ 100).
Here N is the number of points and R is the radius of the circle. You can
assume that the center of the circle is always at the origin. This line is
followed by N lines each of which contains a floating-point number theta
(0.0<=theta<360.00) which actually denotes the angle in degree the
designated point creates with respect to the origin with x-axis. So for example
if theta is 30.00 degree then the Cartesian coordinate of the intended point is
(
and
. Assume that pi=2cos-1(0).
Input is terminated by a set where the value of N and R is zero. This set should not be processed.
5 1010.00100.00300.00310.00320.003 2010.00100.00300.000 0 |
286 320 |
Problem setter:
Shahriar Manzoor
Special Thanks: Derek Kisman