当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1633:【先!锋!题】Easy Problem

题目描述

There are some positive integer numbers, and you want to divide them into two nonempty sets (every integer should be in and only in one set) and get a value descripted below:
Assume that set A has $n_1$ numbers $A_1,A_2,…,A_{n_1}$; set B has $n_2$ numbers $B_1,B_2,⋯,B_{n_2}$;
Let


Then

We want to know the largest ans.

输入解释

The first line of the input is an integer T (T≤1000), which stands for the number of test cases you need to solve.
Every test case begins with an integer N (2≤N≤1000), then followed by N positive integers on the next line, these numbers will not exceed 1000

输出解释
For every test case, you should output Case #k: first, where k indicates the case number and starts at 1. Then output the answer rounded to six digits after the decimal point. See sample for more details.
输入样例
2
3
1 1 1
3
1 2 3
输出样例
Case #1: 0.000000
Case #2: 7.250000

该题目包含在题集 CCCC选拔赛

题目来源 CCCC 改编自 UESTC

共提交 19

通过率 21.05%
时间上限 内存上限
1000 MS 128 MB