Information
- ID
- 522
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 9
- Tags
- (None)
- # Submissions
- 35
- Accepted
- 3
- Uploaded By
从汉堡店开始进行多源bfs,求出每个位置第一次被香气占据的时间,每次从起点开始做bfs,求出起点到每个位置的距离。 当距离 < 时间,不需要吃丸子 而一旦开始吃丸子,就一定会连续吃丸子,一直吃到走完 因此,找到距离终点最近的距离 < 时间 的位置,从这个位置到终点吃的丸子数即为答案
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.