Bellman-Fordアルゴリズム:最短経路問題の解決方法
#include <iostream> #include <vector> #include <limits> struct Edge { int source, destination, weight; }; void BellmanFord(std::vector<Edge>& edges, int numVertices, int source) { std::vector<int> distance(numVertices, std::numeric_limits<int>::max());>>More