Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- interesting_points = []
- points = []
- table_length, socks_amt, places_amt = map(int, input().split())
- for sock in range(socks_amt):
- left, right = map(int, input().split())
- points.append((left, -1))
- points.append((right, 1))
- for place in range(places_amt):
- interesting_points.append(int(input()))
- points.append((interesting_points[-1], 0))
- points.sort()
- coverage = 0
- results = {}
- for x in points:
- if x[1] == 0:
- results[x[0]] = coverage
- coverage -= x[1]
- for x in interesting_points:
- print(results[x])
Advertisement
Add Comment
Please, Sign In to add comment