#P2267. 琪琪的项链
琪琪的项链
Description
After the -year anniversary of pairing up with scjyholy, laosb spent all his savings to buy a necklace for scjyholy. However, he found that the store had too few styles, so he wanted to buy one and assemble his own unique style to move scjyholy.
First, laosb removes all the beads from the necklace. Then, from left to right, he selects some beads (at least bead) to form a new necklace. Because there are many bead colors, laosb wants to know how many different styles he can form in total.
As shown in the figure, suppose the original necklace has beads: blue, yellow, blue. Then he has the following choices:

Since the answer can be large, please output the result .
Input Format
The first line contains two integers , where is the number of original beads.
The second line contains non-negative integers , each representing the color of a bead. Equal integers indicate the same color, and different integers indicate different colors.
Output Format
Output a single integer: the total number of styles .
3 100
1 888 1
6
4 100
1 2 3 4
15
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号