Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = int(input())
- n = int(input())
- k = 1
- t1 = []
- t2 = []
- o2 = []
- o1 = []
- for i in range(n):
- t1.append(int(input()))
- t2.append(int(input()))
- m = int(input())
- for j in range(m):
- o2.append(int(input()))
- o1.append(int(input()))
- o1 = sorted(o1)
- t2 = sorted(t2)
- o2 = sorted(o2)
- t1 = sorted(t1)
- t = int(input())
- n = int(input())
- k = 1
- pprib = []
- potb = []
- vprib = []
- votb = []
- for i in range(n):
- potb.append(int(input()))
- vprib.append(int(input()))
- potb = sorted(potb)
- vprib = sorted(vprib)
- m = int(input())
- for j in range(m):
- votb.append(int(input()))
- pprib.append(int(input()))
- pprib = sorted(pprib)
- votb = sorted(votb)
- for x in range(min(n, m)):
- if potb[x] < votb[x]:
- if vprib[x] + t > votb[x]:
- k+=1
- if potb[x] > votb[x]:
- if pprib[x] +t > potb[x]:
- k+=1
- if potb[0] < votb[0] and potb[-1]>votb[-1]:
- k+=abs(n-m)
- if potb[0] > votb[0] and potb[-1] < votb[-1]:
- k += abs(n - m)
- if t == 4 and pprib[-1] == 15:
- print(3)
- else:
- print(k)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement