#P1236. A Difficult Exam For Ako Kagari
A Difficult Exam For Ako Kagari
题目描述
It is known that is not so good at using magic, that she even can't fly with broom. As the only witch without magic background in school, learning magic is a challenge to her and even the upcoming examinations have become her nightmare!
In a recent examination, she is given a sequence of balls with different numbers. Her teacher requires to paint the balls with the following rule :"For each of these balls, She has to choose a color and paint the ball with that color by a specific magic . If some balls are painted with the same color, each two balls have to satisfy the condition : ".
Now, wants your help to count what is the minimum number of magical skills she has to practice.
输入格式
In the first line, you are given the number () .
In the second line, you are given the sequence of balls () .
输出格式
Print the minimum number of magical skills has to practice .
样例
5
2 1 4 5 3
2
5
5 5 5 5 5
5
提示
In Sample1:
can pass the exam by, for example, painting and blue and painting , and green. So she has to practice kinds of magical skills.
In Sample2:
All the balls have same number, so has to paint the balls with different color and practice kinds of magical skills.