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 1254. Die Hard

Could you explain the sample to me please ?
Posted by uuuuuuu 5 Apr 2003 20:29
I understand the problem like that :

J - john's position
B - bomb

The first way is :
J 1 0 0
# # 2 0
B 3 0 0

So the time needed is
3 * 1.23 = 3.69

The second :
0 0 0 B
# # 2 0
J 1 0 0

Here the time
2 * 1.23 = 2.64
Total = 2.46 + 3.69 = 6.29

The third :
0 0 0 J
# # 0 1
0 0 0 B

time = 1.23
total = >>>> 7.52 <<<<< ????!!!!!

the answer in the sample isn't even a multiple of v ??!!!
WOuld You be so kind and explain it to me ??
Re: Could you explain the sample to me please ?
Posted by vetas 4 Jun 2008 13:53
>>So the time needed is
>>3 * 1.23 = 3.69


if move diagonal distance is sqrt(2)

(2+2*(sqrt(2)))/1.23=3.9255