aop's blog

By aop, history, 5 weeks ago, In English

Hello everybody! Recently i was solving the problem Voting (Hard Version) on codeforces. But, after reading the problem I had a doubt-:

Can a voter vote if the number of other voters already voted is greater than mi or is it necessary to have exactly mi voters for this voter to get convinced for voting.

For example — If we have the mi array as [1,1,2,3,4,4,4,5,5] and the price array as [1,2,2,2,2,2,2,2,2]. Then how will the voting take place in an optimal way. Can it take place like (1)->(1,1)->(1,1,2)->(1,1,2,3)->(1,1,2,3,4,4,4)->(1,1,2,3,4,4,4,5,5) wiht a net cost of 1?

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it