Блог пользователя hello_hell

Автор hello_hell, история, 3 года назад, По-английски

Problem link: Color Play

I tried a greedy approach for this problem, here is my solution :

Spoiler

But this gave me WA. So I found a test case also:

Spoiler

answer should be 1 , but my code gives 3. I guess this is DP problem. Can anyone please help.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится