Background
Special for beginners, ^_^
Description
有 n 根木棒,现在从中选 4 根,想要组成一个正三角形,问有几种选法?
答案对 109+7 取模。
第一行一个整数 n。
第二行往下 n 行,每行 1 个整数,第 i 个整数 ai 代表第 i 根木棒的长度。
Output
一行一个整数代表答案。
Samples
4
1
1
2
2
1
Limitation
1s, 1024KiB for each test case.
- 对于 30% 的数据,保证 n≤5×103。
- 对于 100% 的数据,保证 1≤n≤105,1≤ai≤104。