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 1602. Elevator

Why the answer of example isn't 44?
Posted by Tinker 1 Mar 2008 14:18
Re: Why the answer of example isn't 44?
Posted by Zero~BoBo 2 Mar 2008 06:44
The man should be at the floor before he call for the elevator.

My English is so poor....
Re: Why the answer of example isn't 44?
Posted by plagapong 6 Mar 2008 21:53
I still do not understand.

In the example case.

If Petr go to floor 45:
      He take 4.8*5 = 24 second to go to floor 45.
      The elevator take 0.2*48 + 15 + 0.2*44 = 33.4 seconds to go to floor 1, stop there 15 seconds, and then go up to floor 45.
      So, Petr must wait for 33.4-24 = 9.4 secs, go in for 5 secs, and go down take 44*0.2 = 8.8 secs
      The total time is 24 + 9.4 + 5 + 8.8 = 47.2 secs

Now compare with Pert go to floor 44:
      He take 4.8*6 = 28.8 second to go to floor 44.
      The elevator take 0.2*48 + 15 + 0.2*43 = 33.2 seconds to go to floor 1, stop there 15 seconds, and then go up to floor 44.
      So, Petr must wait for 33.2-28.8 = 4.4 secs, go in for 5 secs, and go down take 43*0.2 = 8.6 secs
      The total time is 28.8 + 4.4 + 5 + 8.6 = 46.8 secs!

So, go to floor 44 is better, isn't it?

Edited: uh oh... I misunderstand the question. The elevator will no go up till Petr press the button of elevator. Sorry.

Edited by author 07.03.2008 18:57
Re: Why the answer of example isn't 44?
Posted by HellDred 25 Mar 2008 23:48
I understand too...


Edited by author 25.03.2008 23:50