C++ アルゴリズムとデータ構造のライブラリ
#include "library/graph/base/edge.hpp"from: 辺の元の頂点to: 辺の先の頂点cost: 重みidx: 辺のidなし
vector<Edge> edges;
#pragma once
struct Edge {
int from, to;
long long cost;
int idx;
Edge(int from, int to, long long cost = 1, int idx = -1)
: from(from), to(to), cost(cost), idx(idx) {}
};#line 2 "library/graph/base/edge.hpp"
struct Edge {
int from, to;
long long cost;
int idx;
Edge(int from, int to, long long cost = 1, int idx = -1)
: from(from), to(to), cost(cost), idx(idx) {}
};