#B. 三角形的个数

    Type: Default 2000ms 16MiB

三角形的个数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

背景

小明遇到一堆木棍,于是突发奇想想用这些木棍摆三角形,那么利用这些木棍可以有多少种方案呢?

输入

第一行为n,表示n条木棍。

第二行输入n条木棍的长度ai,以空格隔开。

输出

从这些木棍中任意选出3根木棍,总共有多少种可能。

Samples

3
1 2 3
0

数据范围

1<=n<=1000。

0<ai<=1000。

第一届编程算法兴趣小组编程大赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
4
Start at
2022-4-21 14:00
End at
2022-4-21 15:00
Duration
1 hour(s)
Host
Partic.
37