61AC - ABC077C: Snuke Festival
ABC091-C (300 points)
import bisect as bi # input N = int(input()) A = sorted(list(map(int, input().split()))) B = sorted(list(map(int, input().split()))) C = sorted(list(map(int, input().split()))) count = 0 for b in B: i = bi.bisect_left(A, b) # A[0],...,A[i - 1] < b k = bi.bisect_right(C, b) # b < C[k],...C[N-1] count += i * (N - k) print(count)