This is a problem from codeforces round 344 div2: http://codeforces.com/contest/631/problem/D Basically it asks to find the number of occurrences of string S in string T but the strings are given in following format: One block may be described as a pair (li, ci), where li is the length of the ith block and ci is the corresponding letter. Ex:aabbc will be represented as 2a 2b 1c The total no. of blocks are ≤ 200 000 and li (as described above) is <=1000000. Can anyone give me the idea to solve it using Rabin Karp algorithm? asked 27 Apr '16, 15:42
