Блог пользователя ArepitaDePernil

Автор ArepitaDePernil, 10 лет назад, По-английски

Hello i am having troubles with this problem, i am getting w.a and i really don't know what else to modify, so if you guys can help me that would be great, ill explain what i do in my solution

1- I construct a graph with edges between teleporters, ends of segments, the start position and the end position, (the weight of this edge is the euclid distance) and an edge connects 2 points if there is no line segment (excluding end and start points)

2- I run a dijkstra [N_points][N_teleporters] , if i find a teleporter i can move to other connected teleporters with 0 cost.

3- i use the function round(A) in the answer

i don't know if my solution is ok, or it needs some other thing, here is my code for more detail about my actual solution:

http://pastie.org/private/7fkh9k8ngg6ue940phydq

Thanks a lot!

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится