Orange Boy Can You Solve It Out? Ep.18
思考题 about poems
Is your love as confusing as the sun acquiesced?
Once a Chinese poem said:
There's sun in the east but rain in the west,
Is your love as confusing as the sun acquiesced?
Now you are given a undirected weighted graph G of N nodes and M edges. It is known that some edges are raining. Each edge has 5 parameters: s_i,t_i,d_i,b_i,l_i means the node it connects from and to, the length of it, the raining delta and raining length.
A edge is raining from time b_i to b_i+l_i, then from b_i+2l_i to b_i+3l_i ... During these time, you are not allowed to pass it.
What's the minimum time to walk from 1 to N without getting wet? Assume that you go at time 0.
Constriants
Subtask 1(10%):li=1e9
Subtask 2(40%):Print "YES" if there exists a way, "NO" otherwise
For all:N,M<=1e5,di,bi,li<=1e9
版权声明:
作者:XGN
链接:https://blog.hellholestudios.top/archives/225
来源:Hell Hole Studios Blog
文章版权归作者所有,未经允许请勿转载。
共有 0 条评论