Buggy python submission (verdict: Runtime Error):
import bisect
point=0
N=int(input())
A=list(map(int,input().split())).sort()
B=list(map(int,input().split())).sort()
C=list(map(int,input().split())).sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_left(C,B[i])
  point+=m*n
print(point)
  

Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
j1=0 #Bのインデックス
while B[j1]<A[0]:
  j1+=1
k1=0
while C[k1]<B[j1]:
  k1+=1
for i in range(N):
  for j in range(j1,N):
    if A[i]<B[j]:
      while k1<N and B[j]>C[k1]:
        k1+=1
      kinds+=(N-k1)
      k1=k1-1
print(kinds)


Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
j1=0 #Bのインデックス
while B[j1]<A[0]:
  j1+=1
k1=0
while C[k1]<B[j1]:
  k1+=1
for i in range(N):
  for j in range(j1,N):
    if A[i]<B[j]:
      while k1<N and B[j]>C[k1]:
        k1+=1
      kinds+=(N-k1)
      k1=k1-1


Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
j1=0 #Bのインデックス
while B[j1]<A[0]:
  j1+=1
k1=0
while C[k1]<B[j1]:
  k1+=1
for i in range(N):
  for j in range(j1,N):
    if A[i]<B[j]:
      for k in range(k1,N):
        if B[j]<C[k]:
          kinds+=1
print(kinds)

Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
j1=0 #Bのインデックス
while B[j]<A[0]:
  j1+=1
k1=0
while C[k]<B[j]:
  k1+=1
for i in range(N):
  for j in range(j1,N):
    if A[i]<B[j]:
      for k in range(k1,N):
        if B[j]<C[k]:
          kinds+=1
print(kinds)

Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)

Buggy python submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
j1=0 #Bのインデックス
while B[j]<A[0]:
  j+=1
k1=0
while C[k]<B[j]:
  k+=1
for i in range(N):
  for j in range(j1,N):
    if A[i]<B[j]:
      for k in range(k1,N):
        if B[j]<C[k]:
          kinds+=1
print(kinds)

Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
kinds=0
i=0
while i<N:
  for j in range(N):
    if A[i]<B[j]:
      for k in range(N):
        if B[j]<C[k]:
          kinds+=1
  i+=1
print(kinds)
 

Fixed submission:
import bisect
point=0
N=int(input())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
for i in range(N):
  m=bisect.bisect_left(A,B[i])
  n=bisect.bisect_right(C,B[i])
  point+=m*(N-n)
print(point)