Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
a_list = input().split()
a_list = [int(a) for a in a_list]

b_list = input().split()
b_list = [int(b) for b in b_list]

c_list = input().split()
c_list = [int(c) for c in c_list]

a_ar = np.sort(np.array(a_list))
b_ar = np.sort(np.array(b_list))
c_ar = np.sort(np.array(c_list))

goukei = 0
for b in b_ar:
    goukei += len(a_ar[a_ar<b]) * len(c_ar[c_ar>b])
    
print(goukei)

Fixed submission:
import bisect

n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

a = sorted(a)
b = sorted(b)
c = sorted(c)

ans = 0

for x in b:
    aa = bisect.bisect_left(a,x)
    cc = len(c) - bisect.bisect_right(c,x)
    ans += aa * cc

print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
a_list = input().split()
a_list = [int(a) for a in a_list]

b_list = input().split()
b_list = [int(b) for b in b_list]

c_list = input().split()
c_list = [int(c) for c in c_list]

a_ar = np.array(a_list)
b_ar = np.array(b_list)
c_ar = np.array(c_list)

b_count_ar = np.sum(b_ar[:,np.newaxis]<c_ar,axis=1)
# print(b_count_ar)
a_count = (a_ar[:,np.newaxis]<b_ar).astype(int)
# print(a_count)

print(np.sum(a_count * b_count_ar))

Fixed submission:
import bisect

n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

a = sorted(a)
b = sorted(b)
c = sorted(c)

ans = 0

for x in b:
    aa = bisect.bisect_left(a,x)
    cc = len(c) - bisect.bisect_right(c,x)
    ans += aa * cc

print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())
a_list = input().split()
a_list = [int(a) for a in a_list]

b_list = input().split()
b_list = [int(b) for b in b_list]

c_list = input().split()
c_list = [int(c) for c in c_list]

a_ar = np.array(a_list)
b_ar = np.array(b_list)
c_ar = np.array(c_list)

# a_ar.sort()
# b_ar.sort()
# c_ar.sort()

# b_count = []
# for b in b_ar:
#     b_count.append(len(c_ar[c_ar>b]))
b_count_ar = np.sum(b_ar[:,np.newaxis]<c_ar,axis=1)


# b_count_ar = np.array(b_count)

# count = 0
# for a in a_ar:
# count += b_count_ar[np.where(b_ar>a)[0]].sum()
    
print(np.sum((a_ar[:,np.newaxis]<b_ar).astype(int) * b_count_ar))

Fixed submission:
import bisect

n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

a = sorted(a)
b = sorted(b)
c = sorted(c)

ans = 0

for x in b:
    aa = bisect.bisect_left(a,x)
    cc = len(c) - bisect.bisect_right(c,x)
    ans += aa * cc

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
a_list = input().split()
a_list = [int(a) for a in a_list]

b_list = input().split()
b_list = [int(b) for b in b_list]

c_list = input().split()
c_list = [int(c) for c in c_list]

a_ar = np.array(a_list)
b_ar = np.array(b_list)
c_ar = np.array(c_list)

a_ar.sort()
b_ar.sort()
c_ar.sort()

b_count = []
for b in b_ar:
    b_count.append(len(c_ar[c_ar>b]))
    
b_count_ar = np.array(b_count)

count = 0
for a in a_ar:
    count += b_count_ar[np.where(b_ar>a)[0]].sum()
    
print(count)

Fixed submission:
import bisect

n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

a = sorted(a)
b = sorted(b)
c = sorted(c)

ans = 0

for x in b:
    aa = bisect.bisect_left(a,x)
    cc = len(c) - bisect.bisect_right(c,x)
    ans += aa * cc

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
a_list = input().split()
a_list = [int(a) for a in a_list]

b_list = input().split()
b_list = [int(b) for b in b_list]

c_list = input().split()
c_list = [int(c) for c in c_list]
# a_ar = np.unique(np.array(a_list))
# b_ar = np.unique(np.array(b_list))
# c_ar = np.unique(np.array(c_list))
a_ar = np.array(a_list)
b_ar = np.array(b_list)
c_ar = np.array(c_list)
count = 0
for a in a_ar:
    for b in b_ar[b_ar>a]:
        count += len(c_ar[c_ar>b])

print(count)

Fixed submission:
import bisect

n = int(input())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
c = [int(x) for x in input().split()]

a = sorted(a)
b = sorted(b)
c = sorted(c)

ans = 0

for x in b:
    aa = bisect.bisect_left(a,x)
    cc = len(c) - bisect.bisect_right(c,x)
    ans += aa * cc

print(ans)