Score : $400$ points
You are given an integer sequence $A = (A_1, \dots, A_N)$ of length $N$.
Find the number of triplets of integers $(i, j, k)$ satisfying all of the conditions below.
Input is given from Standard Input in the following format:
$N$ $A_1$ $\ldots$ $A_N$
Print the answer.
3 6 2 3
2
$(i, j, k) = (1, 2, 3), (1, 3, 2)$ satisfy the conditions.
1 2
0
10 1 3 2 4 6 8 2 2 3 7
62