Codeforces Round #382 (Div. 2)A到D題 A. Ostap and //B. Urbanization//C. Tennis Championship//D. Taxes
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 ai.
Authorities plan to build two cities, first for n1 people
and second for n
To 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
Please, help authorities find the optimal way to pick residents for two cities.