what is sufficient condition for Codeforces round#658 Div2.E mastermind problem

Revision en1, by dra2421, 2020-07-26 06:00:44

I suppose by Monogon Monogon's solution for this problem that the sufficient and necessary condition is 2*f <= 2*n -x-y , where f = number of most frequent color after making x matches. so in my solution when I write only this condition it gives the wrong answer on test case(2) first solution but after adding an extra condition it gets accepted corrected . can someone explain, please??

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dra2421 2020-07-26 06:00:44 667 Initial revision (published)