https://justicehui.github.io/tutorial/2020/09/05/graph-with-segment-tree/ 를 하고 https://justicehui.github.io/medium-algorithm/2018/08/30/01BFS/ 를 하면 O(n log n)에 풀 수 있음 - dc official App
으
고인물의 세그 뇌절 멈춰!