You are given a string SSS which consists of 250000250000250000 lowercase latin letters at most. We define FFF as the maximal number of times that some string with length xxx appears in SSS. For example for string ′ababa′'ababa'′ababa′, FFF will be 222 because there is a string ′aba′'aba'′aba′ that occurs twice. Your task is to output FFF for every iii so that 1≤i≤∣S∣1le ile|S|1≤i≤∣S∣.
You are given a string SSS which consists of 250000250000250000 lowercase latin letters at most. We define F(x)F(x)F(x) as the maximal number of times that some string with length xxx appears in SSS. For example for string ′ababa′'ababa'′ababa′, F(3)F(3)F(3) will be 222 because there is a string ′aba′'aba'′aba′ that occurs twice. Your task is to output F(i)F(i)F(i) for every iii so that 1≤i≤∣S∣1le ile|S|1≤i≤∣S∣.
标签: HBC237661[SDOI2013]森林 主席树 启发式合并 数据结构NSUBSTR - Substrings题解