输入:
2
0 0
7154505 6988119
正确输出:
10001037.3938
以下题解输出 0.000:
https://www.luogu.com.cn/article/2n7489mg
以下题解输出 100000000.0000:
https://www.luogu.com.cn/article/gopxzkn5
以下题解输出 10000000.0000:
https://www.luogu.com.cn/article/niqu5v5f
以下题解输出 100000.0000:
https://www.luogu.com.cn/article/a2cc2jvy(作者专栏已被封禁)
以下题解输出 -nan:
https://www.luogu.com.cn/article/pfab6npz
以下题解输出 23333333.0000:
https://www.luogu.com.cn/article/z97grhn5
以下题解输出 46340.9500:
https://www.luogu.com.cn/article/n7k7qb3q
以下题解输出 45825.7569:
https://www.luogu.com.cn/article/hbdh53iy
以下题解输出 65536.0000:
https://www.luogu.com.cn/article/maik1cnx
以下题解输出 2147483647.0000:
https://www.luogu.com.cn/article/b6nmywfd
以上题解大部分是因为 max 值设的不够大或没有考虑到 n=2 的情况所以 WA 的(另外很好奇这题 n=1 时应该输出什么)。
以下题解输出 10001037.3939,原因为精度不够,用 C++ 的 long double 即可通过(另外可以构造极端数据使得答案超过下面部分代码设定的最大值,导致下面代码因为非精度原因输出错误):
https://www.luogu.com.cn/article/susnoojn
https://www.luogu.com.cn/article/jozvylpe(语言:Pascal)
https://www.luogu.com.cn/article/yhtvaolq
https://www.luogu.com.cn/article/ckill84e
https://www.luogu.com.cn/article/o4p6wql5
https://www.luogu.com.cn/article/qnaxc6wd
https://www.luogu.com.cn/article/44mp66p5
https://www.luogu.com.cn/article/g9pjm2eu
https://www.luogu.com.cn/article/fn98vwi0(Pascal)
https://www.luogu.com.cn/article/tvtsk62b
顺带一提,经过 assert,本题所有数据均小于 100000,而数据范围却写的是 1e9。