Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def try2():
- timestamps = [None for _ in range(32768)]
- count = int(input())
- for c in range(count):
- start, end, delegated = [int(x) for x in input().split()]
- add = 1 + delegated
- if timestamps[start]:
- timestamps[start][0] += add
- else:
- timestamps[start] = [add,0]
- if timestamps[end]:
- timestamps[end][1] += add
- else:
- timestamps[end] = [0,add]
- result = 0
- guests = 0
- for t in timestamps:
- if t:
- add, remove = t
- guests += add
- result = max(result,guests)
- guests -= remove
- print(result)
- try2()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement