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

Правка en1, от 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??

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский dra2421 2020-07-26 06:00:44 667 Initial revision (published)