How did so many people get 1430D (Educational Codeforces Round 96) right ?

Revision en1, by AjaySabarish, 2020-10-11 15:25:18

How did so many people get D right ? more than 2000 ppl got AC, just curious, my Approach was F[i] be the answer if string starts from i,

if(str[i]==str[i+1]) 
F[i] = F[j] + 1

where j is the first index diff from i,

else 
F[i] = F[i+2] + 1 

, this approach though wrong, seemed extremely obvious, so those who sovled it in contest did you land on the right approach initially itself, or did you land on the above mentioned approach then realized it's wrong and then moved on ?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English AjaySabarish 2020-10-11 15:25:18 601 Initial revision (published)