ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1025. Демократия в опасности

Doubt regarding solution
Послано ashwin 20 ноя 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
Послано amirani 18 июл 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
Послано Md. Sifat 25 апр 2019 02:14
Still i can't understand the problem. Can you explain again pls.