1876: 【CSP二维数组】求最大梯形的面积▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

从键盘读入 lns="http://www.w3.org/1998/Math/MathML">n ( lns="http://www.w3.org/1998/Math/MathML">3n100 )个梯形的上底、下底和高,请问这 lns="http://www.w3.org/1998/Math/MathML">n 个梯形中,最大面积的梯形的面积是多少?(梯形面积的求解公式为 lns="http://www.w3.org/1998/Math/MathML">S=(a+b)×h/2 ,也就是 lns="http://www.w3.org/1998/Math/MathML">(上底+下底)×/2 

Input

 lns="http://www.w3.org/1998/Math/MathML">1 行为 lns="http://www.w3.org/1998/Math/MathML">1 个整数 lns="http://www.w3.org/1998/Math/MathML">n ,接下来 lns="http://www.w3.org/1998/Math/MathML">n 行每行 lns="http://www.w3.org/1998/Math/MathML">3 个整数分别代表梯形的上底、下底和高。

Output

最大面积梯形的面积(结果保留 lns="http://www.w3.org/1998/Math/MathML">1 位小数)

Sample Input Copy

2
1 2 3
2 3 4

Sample Output Copy

10.0