这题只能用dij堆优化吗?

P4779 【模板】单源最短路径(标准版)

FrankShix @ 2024-12-15 11:32:48

spfa 32pts

裸dij 0pts


by zhouzihang1 @ 2024-12-15 11:36:10

@FrankShix https://www.luogu.com.cn/discuss/887897


by s_u_n_s_h_i_n_e @ 2024-12-15 16:02:25

@FrankShix Bellman-Ford算法O(VE) SPFA仅常规情况非O(VE) Dijstra算法O(V^2) Dijstra堆优化O(log V)


|