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 1911. Titan Ruins: Overtaking Fire

Anti-WA22 Test
Posted by bsu.mmf.team 29 Oct 2012 19:40
This problem is not difficult. A lot of people got long sequences of WA#22 (as well as I did) because of one very stupid mistake. I hope this test will help to understand this mistake:

10 10 20 10 100 1 2012 10000
1
30 60
Answer: 15000.0000000
Re: Anti-WA22 Test
Posted by Bogatyr 1 Nov 2012 12:22
Thanks for the test.     I get a different answer (and have WA22) -- 14000.   To  get your answer from my calculations you're either stopping the cart in the tunnel (which should never be necessary I think) or you're getting a different value for the time when the fire passes the end of the tunnel.   I'm not sure where my mistake is.   The cart clearly fully enters the tunnel at time 4, and the back of the fire passes the end of the tunnel at time 9 (the fire does not meet the cart before it fully enters the tunnel).  9-4=5.   Covering 20 m over 5 seconds with initial velocity 10 requires deceleration of a = 2.4, which is 1.4 more than 1, thus 14000.   I'm assuming the front of the cart can't enter the tunnel into the fire...

What's wrong with my reasoning?

Edited by author 01.11.2012 12:30
Re: Anti-WA22 Test
Posted by bsu.mmf.team 1 Nov 2012 18:09
With deceleration 2.4 after 5 seconds in the tunnel a velocity of the cart will be equal 10 - 2.4*5 = -2.
Oops :)
Re: Anti-WA22 Test
Posted by Bogatyr 2 Nov 2012 01:27
Haha!   That's funny.    I just used "s = v * t - 1/2 a * t^2" but forgot to check whether  it involved "backing up" :).   Sorry to Soren and Alba for barbecuing you before backing you up into the safety of the tunnel!
Re: Anti-WA22 Test
Posted by bsu.mmf.team 2 Nov 2012 12:13
I'm sure they'll forgive you. You are not the first who does that ;)

It's very funny that this fact didn't allow to solve the problem anybody who tried to do it during the contest.

Edited by author 02.11.2012 12:14
Re: Anti-WA22 Test
Posted by Bogatyr 8 Nov 2012 14:54
At long last, AC.    Lots of little details to pay attention to in this one!