Division + LCP (hard version)

Problem Name:
Division + LCP (hard version)
Site:CodeForces
Links:
Tags:
Problem setters: