The LCS Range Queries Question. Need Help!

Правка en3, от viralm, 2018-05-11 15:19:41
I am trying to solve a problem where I am given 2 strings A and B. Length of A is n and length of B is m. Now, q queries need to be answered. Each query will consist of 2 integers i and j such that 1 <= i,j <= n. For each such query, I want to find the length of the longest common sub-sequence of A.sub_string(i, j) and B.
Constraints:
1 <= n <= 10^4
1 <= m <= 10^4
1 <= Q <= 10^3

Time Limit: 3 seconds
Теги #dp, #strings, #data structure

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский viralm 2018-05-11 15:20:25 2 Tiny change: '= Q <= 10^3\n\nTime L' -> '= Q <= 10^2\n\nTime L'
en3 Английский viralm 2018-05-11 15:19:41 6 Tiny change: 'such that 0 <= i,j <= n - 1. For each' -> 'such that 1 <= i,j <= n. For each'
en2 Английский viralm 2018-05-11 15:16:15 5 Tiny change: ' find the length of' -> ' find the length of'
en1 Английский viralm 2018-05-11 15:14:15 506 Initial revision (published)