「codeforces - 1481F」AB Tree
link。理一下逻辑,主要讲一下我做题时的疑惑和其它题解没提到的细节。首先容易看到,一个必然不劣的贪心策略是把尽量靠近根的层铺成同样的字符。也许会有疑惑,字符串是否本质不同的判定每个位置地位相等...
In mathematics you don't understand things, you just get used to them.
In mathematics you don't understand things, you just get used to them.