luogu#P3799. 小 Y 拼木棒
小 Y 拼木棒
Background
In the previous problem, Xiao Y cut a lot of wooden sticks. Now she wants to put the sticks together.
Problem Description
There are wooden sticks. Choose of them, and you want to be able to form an equilateral triangle. How many such selections are there.
The answer is taken modulo .
Input Format
The first line contains an integer .
From the second line, there are lines. Each line contains integer. The -th integer represents the length of the -th stick.
Output Format
Output a single integer representing the answer.
4
1
1
2
2
1
Hint
Constraints
- For of the testdata, it is guaranteed that .
- For of the testdata, it is guaranteed that , .
About the title: Due to some unforeseen circumstances, the name has been changed. We sincerely apologize.
Translated by ChatGPT 5