Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- T, W, Y, V = map(int, input().split(' '))
- N = int(input())
- cols = list(map(int, input().split(' ')))
- K = int(input())
- cars = list(map(int, input().split(' ')))
- res = T*K
- if V + Y == 0:
- for car in cars:
- for col in cols:
- pass
- for car in cars:
- for col in cols:
- w = col
- ts = (w-car+w*Y)/(V+Y)
- w = col+W
- tf = (w - car + w * Y) / (V + Y)
- if ts <= 0:
- ts = 0
- if tf <= 0:
- tf = 0
- if ts >= T:
- ts = T
- if tf >= T:
- tf = T
- res -= abs(tf-ts)
- # print('Start: {} \nFinish: {}\n---'.format(ts,tf))
- # print('*'*20)
- print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement