10832 - Yoyodyne

All about problems in Volume 108. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
Andrey
New poster
Posts: 16
Joined: Sat Mar 05, 2005 8:25 pm
Location: Ukraine,Vinnitsa

10832 - Yoyodyne

Post by Andrey » Wed Mar 23, 2005 9:28 am

Please HELP!!!! :oops: :oops:

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Wed Mar 23, 2005 11:04 am

Here are some inputs and output from my accepted program.

Code: Select all

2 1 1 3
0 0 1
0 0 10
0 0 5

10 1 1 1
0 0 101

4 1 1 1
101 101 101

7 2 3 1
555 555 555

7 2 3 1
123 456 789

55 2 11 2
12 34 56
55 55 55

0 0 0 0
Output:

Code: Select all

Mission 1: FAILURE!! Traveled: 2.00  From Home: 7.00
Mission 2: FAILURE!! Traveled: 10.00  From Home: 90.00
Mission 3: FAILURE!! Traveled: 4.00  From Home: 170.36
Mission 4: FAILURE!! Traveled: 10.50  From Home: 950.21
Mission 5: FAILURE!! Traveled: 10.50  From Home: 908.20
Mission 6: SUCCESS!! Time: 10.33  Traveled: 113.63  Fuel Left: 34.34
hope it helps.

Andrey
New poster
Posts: 16
Joined: Sat Mar 05, 2005 8:25 pm
Location: Ukraine,Vinnitsa

Post by Andrey » Wed Mar 23, 2005 11:45 am

I test my code on this tests!
I can't find mistake!!!

Can anybody help me??
Last edited by Andrey on Wed Mar 23, 2005 4:16 pm, edited 1 time in total.
Sorry for my English!!

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Wed Mar 23, 2005 11:56 am

The next buoy to visit is determined by the closest buoy in the mission that has not yet been visited. In case of a tie, the buoy information that comes first in the input is given preference.
Your code always processes points in the order they come.

Andrey
New poster
Posts: 16
Joined: Sat Mar 05, 2005 8:25 pm
Location: Ukraine,Vinnitsa

!

Post by Andrey » Wed Mar 23, 2005 4:15 pm

The next buoy to visit is determined by the closest buoy in the mission that has not yet been visited. In case of a tie, the buoy information that comes first in the input is given preference.
I don't understand this sentence, please say this in other words!! :oops:

Thank you!!!
Sorry for my English!!

txandi
New poster
Posts: 25
Joined: Sun Feb 29, 2004 2:06 am

Post by txandi » Wed Mar 23, 2005 4:49 pm

The next buoy to visit is determined by the closest buoy in the mission that has not yet been visited. In case of a tie, the buoy information that comes first in the input is given preference.
It means that when you're in a place A, the next place B to visit must be the not already visited one that minimizes dist(A,B). In case of tie, you have to choose the first B that minimizes dist(A,B) that appears in the input.

Hope it helps!

Andrey
New poster
Posts: 16
Joined: Sat Mar 05, 2005 8:25 pm
Location: Ukraine,Vinnitsa

Post by Andrey » Wed Mar 23, 2005 7:03 pm

Thank you very much!!

Finally, i got AC!!!!!
Sorry for my English!!

Post Reply

Return to “Volume 108 (10800-10899)”