#P1284. 三角形牧场
三角形牧场
Description
Like everyone, cows enjoy variety. They are imagining a new look for their pastures. The cow architect Hei wants to build a triangular pasture enclosed by a beautiful white fence. She has boards, each with an integer length , and she wants to use all the boards to enclose a triangle so that the pasture area is maximized.
Please help Miss Hei construct such a pasture and compute this maximum area.
Input Format
Line : an integer .
Lines to : each line contains one integer. On line , the integer denotes the length of the -th board.
Output Format
A single integer: the result of multiplying the maximum pasture area by and then truncating the fractional part. If it is impossible to construct, output .
5
1
1
3
3
4
692
Hint
Explanation for Sample Input/Output 1: $692=\text{truncated}(100\times\text{triangle area})$, and the triangle is equilateral with side length .
Constraints: For of the testdata, it is guaranteed that , .
Translated by ChatGPT 5
京公网安备 11011102002149号