Problem: 洛谷3546 Analysis: I gave up and saw other's solution when I had nearly thought of the method ... What a pity Let's define a border of string \(s\) as a prefix \(p\) of \(s\) that \(p\) is also a suffix of \(s\), and \(p\) is not longer than h…