#Lutece1502. Inequality
Inequality
Migrated from Lutece 1502 I
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Little Ruins is a studious boy, recently he learned inequation!
As homework, his teacher gives him a problem of inequation: give you an array a with length , please find an array with length and for each from to and try to minimize the sum of .
Input
First line contains an integer (), which indicates the number of test cases.
Every test case begins with an integers (), which is the length of array .
The second line contains integers (), indicating the array .
For of the use cases, holds.
Output
For every test case, you should output Case #x: y
, where x
indicates the case number and counts from and y
is the result.
Round the y
to the fifth digit after the decimal point.
Samples
2
4
2 3 2
4
1 2 3
Case #1: 5.77350
Case #2: 5.47723
Resources
第二届中国大学生程序设计竞赛 杭州站(CCPC 2016 Hangzhou Site)