. He can rearrange the sequence using the following operation any number of times:. a_i, a_{i-1}, dots, a_1, a_n, a_{n-1}, dots, a_{i+1}. Bobo would like to know the number of different sequences can be obtained modulo
Bobo has a sequence a_1,a_2,dots,a_n a 1 ,a 2 ,…,a n . He can rearrange the sequence using the following operation any number of times: + Select an integer i ( 1 le i le n 1≤i≤n) and change the sequence to a_i, a_{i-1}, dots, a_1, a_n, a_{n-1}, dots, a_{i+1} a i ,a i−1 ,…,a 1 ,a n ,a n−1 ,…,a i+1 . Bobo would like to know the number of different sequences can be obtained modulo (10^9+7) (10 9 +7).
(图片来源网络,侵删)