dijkstra with segment tree
https://codeforces.me/contest/1846/submission/215981788
Codeforces Round 1123 Solution Discussion