685E

CF685E Travelling Through the Snow Queen's Kingdom

题意 给定一张图,走出当前边的时间为 \(i\)。 \(q\) 次询问,问 \(s\) 是否能在 \(l \to r\) 中走到 \(t\)。 Sol 考虑将边从大到小插入图中。 注意到当前边只能对起点造成贡献。 复杂度 \(O(n \times \max\{n, m\})\) Code #incl ......
Travelling Through Kingdom Queen 685E
共1篇  :1/1页 首页上一页1下一页尾页