author: Yan Liu 原OJ链接：https://acm.sjtu.edu.cn/OnlineJudge-old/problem/1199
LL has n (n <= 100) balls. Every ball has its own color which belongs to 1 .. C. Today, LL wants to put all his balls into some boxes. He has one rule that never puts two balls with different color into same box.
Note that any two boxes can't be distinguished. LL wants to know how many different ways to put his balls into boxes (you may assume that LL has infinitely number of boxes)?
Input contains two line. The first line has two integers N and C, which means the number of balls and the number of colors. The second line has N integers, the i-th integer color_i represents the color ID of the i-th ball (1 <= color_i <= C)
Output should have one line, contains an integer R, indicates the number of ways that LL puts his balls into boxes.
Sample Input 1
2 2 1 2
Sample Output 1
Sample Input 2
3 1 1 1 1
Sample Output 2
Time limit: 500 msec
Memory limit: 64 MB