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

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

https://mirror.codeforces.com/problemset/problem/49/D

I managed to solve this problem with a very very complicated approach involving separating groups of consecutive characters which are same. Then separating the even-sized groups and then applying some DP on them.

My submission :

https://mirror.codeforces.com/contest/49/submission/167985059

I want to ask if anyone can tell me a simpler approach. I tried to find an editorial but there were none. I also couldn't make sense of some accepted submissions that I tried to look at.

Or if someone could make some sense of this solution. https://mirror.codeforces.com/contest/49/submission/223125

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

»
4 года назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

Hint: What does the end string look like?