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

GREEDY at all
Posted by lonelycorn 2 Nov 2007 20:23
let a[i] stand for the member of party i;
sort it to make a[1]<a[2]<...<a[n]
for i:=1 to (k+1) div 2 do inc(answer,(a[i]+1) div 2);
the answer is sure to be the best one.
Re: GREEDY at all
Posted by George Skhirtladze 12 Apr 2010 21:04
I have such sing too,but say me how you write this program I don't understood!