ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1025. Democracy in Danger

Doubt regarding solution
Posted by ashwin 20 Nov 2010 13:48
hello all,

I am new to programming problems.. I have a doubt regarding the solution.. I got the answer accepted but i want to know how did this problem come under the category of sorting??
I tried thinking a lot but i could never even guess that we have to use sorting.. I only came to know after i saw the hints in this forum.

SO please can anyone explain how did this problem come under sorting??
Re: Doubt regarding solution
Posted by amirani 18 Jul 2011 13:47

one way to solve this program is : you should sort the array in witch is written quantity of  members in each group . Then you should run this array from the first to k div 2 and remember sum of ((each element div 2) +1) this will be minimal quantity of supporters of the party, that can put into effect any decision.
Sorry for bed English if you couldn't understand write me and i'll try to explain ...
Re: Doubt regarding solution
Posted by Md. Sifat 25 Apr 2019 02:14
Still i can't understand the problem. Can you explain again pls.