ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2022. Riding a Toad

I don't understand the first example
Posted by Felix_Mate 29 May 2019 10:02
Pls, explain me why i'm wrong
Let T is answer.
t in [0,T]: x(t)=vx*t, y(t)=vy*t-g*t^2/2
t > T: x(t) = x(T) + (vx+ux)(t-T) = (vx+ux)t - ux*T
       y(t) = y(T) + (vy - g*T + uy)*(t-T)-g * (t-T)^2/2 = (-g/2)*t^2 + (vy+uy)*t-y*T

t1, t2: x(t1)=L, x(t2)=L+l
t1 = (L+ux*T)/(vx+ux)
t2 = (L+l+ux*T)/(vx+ux)
tv: y'(tv)=0, tv = (vy+uy)/g

Then i use conditions:
0<T<L/vx, T<2*vy/g
h<y(t1)<h+d, h<y(t2)<h+d
if tv in (T-eps, T+eps) then y(tv)<h+d

My algo:
find all candidates from conditions and then check that candidate is good

My code:
[code deleted]


Edited by moderator 27.07.2023 17:23
Re: I don't understand the first example
Posted by InstouT94 10 Jul 2023 02:27
"Nod can throw a stone with an ABSOLUTE initial speed (ux, uy)."