我写了错的写法,就是从 1 沿着最短路走到 s1,从 2 沿着最短路走到 s2,然后求最短路树的交集,这样竟然过了!!!
实际上很容易就 hack 掉。
10 11 1 2 2 3 3 4 4 5 4 6 1 7 7 8 8 5 1 9 9 10 10 6 5 4 6 4