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

N, M, Q = map(int, input().split())
d = np.zeros([N+1, N+1], np.int32)

for _ in range(M):
	tl,tr = map(int, input().split())
	d[N-tl,tr] += 1

d = np.add.accumulate(d, axis = 1)
d = np.add.accumulate(d)

ans = []
for _ in range(Q):
	tp,tq = map(int, input().split())

	ans.append(d[N-tp,tq])

for a in ans:
	print(a)

Fixed submission:
import numpy as np
import sys

N, M, Q = map(int, input().split())

I = sys.stdin.read().split()

L,R = np.array(I[:2*M], np.int32).reshape([2,-1], order='F')
p,q = np.array(I[2*M:], np.int32).reshape(2,-1, order='F')
d = np.zeros([N+1, N+1], np.int32)

d = np.zeros([1+N, 1+N], np.int32)
np.add.at(d, (N-L,R), 1)

d = np.add.accumulate(d, axis = 1)
d = np.add.accumulate(d)

ans = d[N-p,q]

for a in ans:
	print(a)

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

N, M, Q = map(int, input().split())
d = np.zeros([N+1, N+1], np.int32)

for _ in range(M):
	tl,tr = map(int, input().split())
	d[tl,tr] += 1

d = np.add.accumulate(d, axis = 1)
d = np.flipud(d)

d = np.add.accumulate(d)

d = np.flipud(d)

ans = []
for _ in range(Q):
	tp,tq = map(int, input().split())

	ans.append(d[tp,tq])

for a in ans:
	print(a)

Fixed submission:
import numpy as np
import sys

N, M, Q = map(int, input().split())

I = sys.stdin.read().split()

L,R = np.array(I[:2*M], np.int32).reshape([2,-1], order='F')
p,q = np.array(I[2*M:], np.int32).reshape(2,-1, order='F')
d = np.zeros([N+1, N+1], np.int32)

d = np.zeros([1+N, 1+N], np.int32)
np.add.at(d, (N-L,R), 1)

d = np.add.accumulate(d, axis = 1)
d = np.add.accumulate(d)

ans = d[N-p,q]

for a in ans:
	print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n, m, q = map(int,input().split())
t = [list(map(int,input().split())) for i in range(m)]
cond = [list(map(int,input().split())) for j in range(q)]
for i in range(q):
    cond1 = [1 if t[j][0] >= cond[i][0] and t[j][1] <= cond[i][1] else 0 for j in range(m)]
    print(sum(cond1))
    

Fixed submission:
import numpy as np
import sys

N, M, Q = map(int, input().split())

I = sys.stdin.read().split()

L,R = np.array(I[:2*M], np.int32).reshape([2,-1], order='F')
p,q = np.array(I[2*M:], np.int32).reshape(2,-1, order='F')
d = np.zeros([N+1, N+1], np.int32)

d = np.zeros([1+N, 1+N], np.int32)
np.add.at(d, (N-L,R), 1)

d = np.add.accumulate(d, axis = 1)
d = np.add.accumulate(d)

ans = d[N-p,q]

for a in ans:
	print(a)

Buggy python submission (verdict: Time Limit Exceeded):
n, m, q = map(int,input().split())
t = [list(map(int,input().split())) for i in range(m)]
cond = [list(map(int,input().split())) for j in range(q)]
for i in range(q):
    cond1 = [(t[j][0]-cond[i][0],t[j][1]-cond[i][1]) for j in range(m)]
    cond2 = [1 if cond1[i][0] >= 0 and cond1[i][1] <= 0 else 0 for i in range(m)]
    print(sum(cond2))

Fixed submission:
import numpy as np
import sys

N, M, Q = map(int, input().split())

I = sys.stdin.read().split()

L,R = np.array(I[:2*M], np.int32).reshape([2,-1], order='F')
p,q = np.array(I[2*M:], np.int32).reshape(2,-1, order='F')
d = np.zeros([N+1, N+1], np.int32)

d = np.zeros([1+N, 1+N], np.int32)
np.add.at(d, (N-L,R), 1)

d = np.add.accumulate(d, axis = 1)
d = np.add.accumulate(d)

ans = d[N-p,q]

for a in ans:
	print(a)