RGBRED — SPOJ

Правка en1, от hello_hell, 2021-08-30 19:43:15

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.

Теги #spoj, #help, #string, # dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский hello_hell 2021-08-30 19:43:15 1540 Initial revision (published)