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

Автор Eddagdeg, история, 8 лет назад, По-английски

Hello codeforces community! I'm stuck in this problem :you are given two strings s1 and s2 in one operation ou can reverse a substring in s2 what's the minimum number of operations needed to get identical strings.Opertations are made only on string 2? link Bonus:what's would be the answer if we can apply operations on both strings? any help! and Thanks^__^

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

»
8 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I would try Meet in the middle technique. Note, that upperbound for the answer is 9, so it should pass time limits with some kind of memorization.

The answer would be the same if we could apply operation on both strings (it's trivial to prove if my approach described above is correct).

»
8 лет назад, скрыть # |
← Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

.