Saturday, September 27, 2014

ACM 1025. Democracy in Danger / Демократия в опасности

It is easy to understand that we need to choose the groups which have the smallest amount of people so that the half of it would be small and the total number of voters would be as small as possible. So we need to sort our given data and choose the first N/2+1 groups.


       FULL SOURCE CODE

5 comments: