Function Curve

TimeLimit:1000MS  MemoryLimit:65535KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
Given sequences of k 1, k 2, … k n, a 1, a 2, …, a n and b 1, b 2, …, b n. Consider following function:

Then we draw F(x) on a xy-plane, the value of x is in the range of [0,100]. Of course, we can get a curve from that plane.
Can you calculate the length of this curve?
Input
The first line of the input contains one integer T (1<=T<=15), representing the number of test cases.
Then T blocks follow, which describe different test cases.
The first line of a block contains an integer n ( 1 <= n <= 50 ).
Then followed by n lines, each line contains three integers k i, a i, b i ( 0<=a i, b i<100, 0<k i<100 ) .
Output
For each test case, output a real number L which is rounded to 2 digits after the decimal point, means the length of the curve.
SampleInput
2 
3 
1 2 3 
4 5 6 
7 8 9 
1 
4 5 6
SampleOutput
215.56 
278.91 
 Hint All test cases are generated randomly.
Submit
题目统计信息详细
总AC数8
通过人数6
尝试人数6
总提交量19
AC率31.58%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: