老哥最后一题是spfa跑一遍最短路,然后对于q个询问res += 2 * dist[idx](idx是读取的q个学校节点)吗
点赞 2

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务