-->
当前位置:首页 > 题库

PROGRAMMING:Enclosure

Luz5年前 (2021-05-10)题库463
$$Bear\_ 2 $$now there are $$n $$iron wires with different lengths. The length of the $$I $$iron wire is $$d_ i$$ 。 He wants to use these wires to circle a piece of land. The wires can be deformed and spliced at will. Now, what's the largest area.
###Input format:
The first line gives the number of sample groups $$t (1 < = T < = 10)$$
The first row of each group of data gives the number of wires $$n (1 < = n < = 10 ^ 5)$$
The second row of each group of data gives $$n $$positive integer and $$I $$positive integer $$d_ i(1<=d_ I < = 10 ^ 3) $$indicates the length of the $$I $$
###Output format:
For each group of input data, output the largest area in a row, retaining 3 decimal places.
###Input example:
Here is a set of inputs. For example:
```in
one
three
1 2 3
```
###Output example:
The corresponding output is given here. For example:
```out
two point eight six five
```
### Tips
Please use $$ACOS (- 1.0) $$as the value of PI $$
The header file corresponding to $$ACOS $$is # include < math. H > < br > < br > < br > < br > < br > file


answer:If there is no answer, please comment