Skip to content

11199: 【原1199】PerfectBall

题目

题目描述

author: Yan Liu 原OJ链接:https://acm.sjtu.edu.cn/OnlineJudge-old/problem/1199

Description

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 Format

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 Format

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

1

Sample Input 2

3 1
1 1 1

Sample Output 2

3

Case Limits

Time limit: 500 msec

Memory limit: 64 MB

Oops! 本题目还没有解答!

助教老师们编题的速度,已经超过了解题的速度!

OJ翻了一新,但本解答集还大多用的是2017-2019级,甚至更早的同学们贡献的答案。

如果你已经AC了,可以的话,请您参考添加页面,与大家一起分享你的题解!