可能只有我会犯这个神笔错误。
开临时变量的时候 (long) double 开成 int,最主要是样例居然给过了。。。
(long) double
int
友情提供一组样例:
Input: 3 5 1 1 2 1 1 2 1 1 2 2 3 1 2 1 0 Output: 1.923