Теперь раздел EDU доступен и на английском языке ×

Reversing String Queries

Правка en2, от themaskedhero, 2016-11-03 22:42:37

Hi CF community!

I was thinking about some problem:

Given a string S, in each query you must reverse some substring of it. Then, at the end you must print the string. Constraints are 1 ≤ |S|, Q ≤ 105 where Q is number of string reversals.

I'm now wondering about what is the offline and the online algorithms to solve this problem.



  Rev. Язык Кто Когда Δ Комментарий
en2 Английский themaskedhero 2016-11-03 22:42:37 22
en1 Английский themaskedhero 2016-11-03 22:41:47 367 Initial revision (published)