Anuj likes to play with sticks. He uses them to form triangles by arranging any 3 sticks in some order. But this time, Anuj has a set of N sticks and he wants to count the number of distinct triangles he can form using these sticks. Triangles should be non-degenerated.
Return the count of distinct triangles that can be formed using the set.
Line 1 : Integer N (number of sticks in the set) (3<=|N|<=1000)
Line 2 : N spaced integers denoting the length of its stick
Sample Input 1:
3 5 4 3
Sample Output 1:
Login to submit your solution