How to solve this problem using bfs?

Правка en1, от hitman264, 2021-05-14 07:13:12

Prelude-

Before people start bashing me, I just wanted to say that the problem is highly rated(2400), so would be too much for me to solve.

However, after spending a day on it :p , I figured out that I can binary search on the answer by taking a prospective number as the maximum and check if we can form a path using <=k nodes as the path, while the Mac distance from this path would be <= prospective answer.

Теги #bfs, # dp

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский hitman264 2021-05-14 18:47:17 94 add the part of confusion
en2 Английский hitman264 2021-05-14 18:44:27 1065 Tiny change: 'o use - \n* **Binary ' -> 'o use - \n- **Binary ' (published)
en1 Английский hitman264 2021-05-14 07:13:12 452 Initial revision (saved to drafts)