Count the different value triplets (A[i], A[j], A[k]) with i < j < k — two triplets with the same values in the same order count once.
Count the different value triplets (A[i], A[j], A[k]) with i < j < k — two triplets with the same values in the same order count once.
Opens with the full question.