Problem 2982 --I Love Palindrome String

2982: I Love Palindrome String

"
Time Limit $2$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $0$ 正确数量 $0$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签
You are given a string S=s1s2..s|S|S=s1s2..s|S| containing only lowercase English letters. For each integer i∈[1,|S|]i∈[1,|S|] , please output how many substrings slsl+1...srslsl+1...sr satisfy the following conditions: 

 ∙∙ r−l+1r−l+1 equals to ii

 ∙∙ The substring slsl+1...srslsl+1...sr is a palindrome string. 

 ∙∙ slsl+1...s⌊(l+r)/2⌋slsl+1...s⌊(l+r)/2⌋ is a palindrome string too. 

|S||S| denotes the length of string SS

A palindrome string is a sequence of characters which reads the same backward as forward, such as madammadam or racecarracecar or abbaabba
There are multiple test cases. 

Each case starts with a line containing a string S(1≤|S|≤3×105)S(1≤|S|≤3×105) containing only lowercase English letters. 

It is guaranteed that the sum of |S||S| in all test cases is no larger than 4×1064×106.
For each test case, output one line containing |S||S| integers. Any two adjacent integers are separated by a space.
abababa
7 0 0 0 3 0 0

推荐代码 查看2982 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$ $ms]
内存最少[$ $KB]
第一AC
第一挑战

赛题来源/所属竞赛 2019 Multi-University Training Contest 2 N/A

竞赛编号 竞赛名称 竞赛时间 访问比赛