简述题意 给定 n , m n,m n,m,对于一个长度为 n n n 的排列 p p p,有函数: F ( p ) = ∑ i = 1 n [ ∣ p i − i ∣ = 1 ] F(p)=\sum_{i=1}^{n}[\left|p_i-i\right|=1 ] F(p)=i=1∑n[∣pi−i∣=1]求有多少个排列满足 F ( p ) = m F(p) = m F(p)=m,答
Problem In a string s of lowercase letters, these letters form consecutive groups of the same character. For example, a string like s = “abbxxxxzyy” has the groups “a”, “bb”, “xxxx”, “z”, and “yy”.