48 teams scored 1680 points on this task, for a maximum score of 60, an average score of 35 and a median score of 30.
Given a permutation P = [P_0, P_1, …, P_N-1] of length N, count the number of tuples 0 ≤ a < b < c < d < N, where P_b < P_a < P_c < P_d. Since the answer can be large, print its remainder modulo 10^9 + 7.