시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
5 초 | 512 MB | 3 | 2 | 2 | 66.667% |
Alice has a sequence $a_1,a_2,\dots,a_n$. She can rearrange the sequence using the following operation any number of times:
Alice would like to know the number of different sequences can be obtained modulo $(10^9+7)$.
The input consists of several test cases terminated by end-of-file. For each test case:
The first line contains an integer $n$, the length of the sequence.
The second line contains $n$ integers $a_1, a_2, \dots, a_n$.
For each test case, print an integer which denotes the result.
4 1 1 1 1 4 1 1 2 2 4 1 2 1 2 4 2 1 2 1
1 4 2 2