{"raw_statement":[{"iden":"statement","content":"Local authorities have heard a lot about combinatorial abilities of Ostap Bender so they decided to ask his help in the question of urbanization. There are _n_ people who plan to move to the cities. The wealth of the _i_ of them is equal to _a__i_. Authorities plan to build two cities, first for _n_1 people and second for _n_2 people. Of course, each of _n_ candidates can settle in only one of the cities. Thus, first some subset of candidates of size _n_1 settle in the first city and then some subset of size _n_2 is chosen among the remaining candidates and the move to the second city. All other candidates receive an official refuse and go back home.\n\nTo make the statistic of local region look better in the eyes of their bosses, local authorities decided to pick subsets of candidates in such a way that **the sum of arithmetic mean** of wealth of people in each of the cities is as large as possible. Arithmetic mean of wealth in one city is the sum of wealth _a__i_ among all its residents divided by the number of them (_n_1 or _n_2 depending on the city). The division should be done in real numbers without any rounding.\n\nPlease, help authorities find the optimal way to pick residents for two cities."},{"iden":"input","content":"The first line of the input contains three integers _n_, _n_1 and _n_2 (1 ≤ _n_, _n_1, _n_2 ≤ 100 000, _n_1 + _n_2 ≤ _n_) — the number of candidates who want to move to the cities, the planned number of residents of the first city and the planned number of residents of the second city.\n\nThe second line contains _n_ integers _a_1, _a_2, ..., _a__n_ (1 ≤ _a__i_ ≤ 100 000), the _i_\\-th of them is equal to the wealth of the _i_\\-th candidate."},{"iden":"output","content":"Print one real value — the maximum possible sum of arithmetic means of wealth of cities' residents. You answer will be considered correct if its absolute or relative error does not exceed 10 - 6.\n\nNamely: let's assume that your answer is _a_, and the answer of the jury is _b_. The checker program will consider your answer correct, if ."},{"iden":"examples","content":"Input\n\n2 1 1\n1 5\n\nOutput\n\n6.00000000\n\nInput\n\n4 2 1\n1 4 2 3\n\nOutput\n\n6.50000000"},{"iden":"note","content":"In the first sample, one of the optimal solutions is to move candidate 1 to the first city and candidate 2 to the second.\n\nIn the second sample, the optimal solution is to pick candidates 3 and 4 for the first city, and candidate 2 for the second one. Thus we obtain (_a_3 + _a_4) / 2 + _a_2 = (3 + 2) / 2 + 4 = 6.5"}],"translated_statement":[{"iden":"statement","content":"地方政府听说了奥斯塔普·本德在组合数学方面的卓越能力，因此请他协助解决城市化问题。有 #cf_span[n] 人计划迁入城市，其中第 #cf_span[i] 个人的财富为 #cf_span[ai]。当局计划建造两座城市，第一座容纳 #cf_span[n1] 人，第二座容纳 #cf_span[n2] 人。当然，这 #cf_span[n] 名候选人中每人只能定居其中一座城市。因此，首先从候选人中选出一个大小为 #cf_span[n1] 的子集定居第一座城市，然后从剩余候选人中选出一个大小为 #cf_span[n2] 的子集迁入第二座城市，其余候选人将收到官方拒信并返回家乡。\n\n为了使当地区域的统计数据在上级眼中更加好看，地方政府决定以某种方式选择候选人，使得两座城市居民财富的算术平均数之和尽可能大。一座城市的财富算术平均数等于该城市所有居民财富之和除以居民人数（第一座城市为 #cf_span[n1]，第二座城市为 #cf_span[n2]）。除法需在实数范围内进行，不作任何舍入。\n\n请帮助当局找出选择两座城市居民的最优方案。\n\n输入的第一行包含三个整数 #cf_span[n]、#cf_span[n1] 和 #cf_span[n2]（#cf_span[1 ≤ n, n1, n2 ≤ 100 000]，#cf_span[n1 + n2 ≤ n]），分别表示希望迁入城市的候选人数量、第一座城市的计划居民数和第二座城市的计划居民数。\n\n第二行包含 #cf_span[n] 个整数 #cf_span[a1, a2, ..., an]（#cf_span[1 ≤ ai ≤ 100 000]），其中第 #cf_span[i] 个整数表示第 #cf_span[i] 位候选人的财富。\n\n请输出一个实数——两座城市居民财富算术平均数之和的最大可能值。你的答案若绝对误差或相对误差不超过 #cf_span[10 - 6]，则被视为正确。\n\n具体而言：设你的答案为 #cf_span[a]，标准答案为 #cf_span[b]，判题程序将认为你的答案正确，当且仅当 。\n\n在第一个样例中，一种最优解是将候选人 #cf_span[1] 安置到第一座城市，候选人 #cf_span[2] 安置到第二座城市。\n\n在第二个样例中，最优解是将候选人 #cf_span[3] 和 #cf_span[4] 选入第一座城市，候选人 #cf_span[2] 选入第二座城市。于是我们得到 #cf_span[(a3 + a4) / 2 + a2 = (3 + 2) / 2 + 4 = 6.5]"},{"iden":"input","content":"输入的第一行包含三个整数 #cf_span[n]、#cf_span[n1] 和 #cf_span[n2]（#cf_span[1 ≤ n, n1, n2 ≤ 100 000]，#cf_span[n1 + n2 ≤ n]），分别表示希望迁入城市的候选人数量、第一座城市的计划居民数和第二座城市的计划居民数。第二行包含 #cf_span[n] 个整数 #cf_span[a1, a2, ..., an]（#cf_span[1 ≤ ai ≤ 100 000]），其中第 #cf_span[i] 个整数表示第 #cf_span[i] 位候选人的财富。"},{"iden":"output","content":"请输出一个实数——两座城市居民财富算术平均数之和的最大可能值。你的答案若绝对误差或相对误差不超过 #cf_span[10 - 6]，则被视为正确。具体而言：设你的答案为 #cf_span[a]，标准答案为 #cf_span[b]，判题程序将认为你的答案正确，当且仅当 。"},{"iden":"examples","content":"输入：\n2 1 1\n1 5\n输出：\n6.00000000\n\n输入：\n4 2 1\n1 4 2 3\n输出：\n6.50000000"},{"iden":"note","content":"在第一个样例中，一种最优解是将候选人 #cf_span[1] 安置到第一座城市，候选人 #cf_span[2] 安置到第二座城市。\n\n在第二个样例中，最优解是将候选人 #cf_span[3] 和 #cf_span[4] 选入第一座城市，候选人 #cf_span[2] 选入第二座城市。于是我们得到 #cf_span[(a3 + a4) / 2 + a2 = (3 + 2) / 2 + 4 = 6.5]"}],"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ n, n_1, n_2 \\in \\mathbb{Z}^+ $ such that $ n_1 + n_2 \\leq n $.  \nLet $ A = (a_1, a_2, \\dots, a_n) $ be a sequence of positive real numbers representing the wealth of $ n $ candidates.\n\n**Constraints**  \n1. $ 1 \\leq n, n_1, n_2 \\leq 100{,}000 $  \n2. $ n_1 + n_2 \\leq n $  \n3. $ 1 \\leq a_i \\leq 100{,}000 $ for all $ i \\in \\{1, \\dots, n\\} $\n\n**Objective**  \nSelect disjoint subsets $ S_1 \\subseteq A $ and $ S_2 \\subseteq A \\setminus S_1 $ such that $ |S_1| = n_1 $ and $ |S_2| = n_2 $.  \nMaximize the sum of arithmetic means:  \n$$\n\\frac{\\sum_{x \\in S_1} x}{n_1} + \\frac{\\sum_{y \\in S_2} y}{n_2}\n$$","simple_statement":null,"has_page_source":false}