#P3799. 小 Y 拼木棒

小 Y 拼木棒

Description

There are nn wooden sticks. Choose 44 of them, and you want to be able to form an equilateral triangle. How many such selections are there.

The answer is taken modulo 109+710^9+7.

Input Format

The first line contains an integer nn.

From the second line, there are nn lines. Each line contains 11 integer. The ii-th integer aia_i represents the length of the ii-th stick.

Output Format

Output a single integer representing the answer.

4 
1
1
2
2
1

Hint

Constraints

  • For 30%30\% of the testdata, it is guaranteed that n5×103n \le 5 \times 10^3.
  • For 100%100\% of the testdata, it is guaranteed that 1n1051 \leq n \le 10^5, 1ai5×1031 \le a_i \le 5 \times 10^3.

About the title: Due to some unforeseen circumstances, the name has been changed. We sincerely apologize.

Translated by ChatGPT 5