Interesting string problem

Revision en1, by dododo89, 2019-09-05 15:07:31

You have an array $$$A$$$ of $$$N$$$ empty strings and $$$M$$$ queries ($$$1 <= N, M <= 2*10^5$$$). There are two types queries:

1) You are given two numbers $$$L, R (1<=l<=R<=N)$$$ and a string $$$S$$$. You need to push back string $$$S$$$ to all strings in array's segment from $$$L$$$ to $$$R$$$.

2) You are given three numbers $$$I, L, R (1<=I<=N, L<=R<= |a[I]|)$$$. You need to print the substring $$$[L; R]$$$ of the string $$$A[I]$$$.

The sum of string lengths is less than $$$10^6$$$.

Tags #strings, #data structure, queries

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dododo89 2019-09-05 15:07:31 476 Initial revision (published)