PAST3H
PAST3H
H Find the shortest time to run the course on which the hurdles are placed, flying or not flying.
code:python
if 1:
if 0:
if 1:
L = 10
XS = []
T1, T2, T3 = 2, 2, 2
if 1:
L = 10
XS = []
T1, T2, T3 = 2, 4, 2
if 1:
L = 10
XS = []
T1, T2, T3 = 4, 2, 2
if 1:
L = 10
T1, T2, T3 = 2, 4, 4
for x in XS:
answer = 1e+99
# print(isHurdle)
def minUpdate(p, t):
# print("update?", p, t)
if p > L:
t = time + T1 // 2 + int((L - position - 0.5) * T2) + penalty
p = L
# print("updated")
fastestTimes = 1e+99 * (L + 1) for position in range(L):
minUpdate(position + 1, time + T1 + penalty)
minUpdate(position + 2, time + T1 + T2 + penalty)
minUpdate(position + 4, time + T1 + 3 * T2 + penalty)
# print(fastestTimes)
---
This page is auto-translated from /nishio/PAST3H. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.