lc substring with rolling hashes