Not able to understand this(Educational Codeforces Round 18, problem: (E) Colored Balls)

Revision en2, by Chodermal1, 2020-01-18 20:12:02

Question Not able to understand the editorial as well as not being able to move forward through my own approach. Let ai be represented as a*x+b*(x+1)=ai;then the diophentine solution be represented as x*(a0+k*(x+1))+(x+1)*(b0-k*x)=ai; so the total set broken down will be equal to K=a0+b0+k(K=sum of coefficients of x and (x+1) and we have to minimise K and sum over all ai. Not able to proceed further and also cant understand the editorial as well.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Chodermal1 2020-01-18 20:12:02 62 Tiny change: '\n[Question]' -> '[Question]'
en1 English Chodermal1 2020-01-18 18:53:30 536 Initial revision (published)