You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
template <size_t N, size_t M = N>
|
|
struct Graph
|
|
{
|
|
// Basic
|
|
struct Edge
|
|
{
|
|
int nxt, to, len;
|
|
};
|
|
int adj[N], ecnt;
|
|
Edge E[M];
|
|
void addEdge(int f, int t, int l)
|
|
{
|
|
E[++ecnt] = {adj[f], t, l};
|
|
adj[f] = ecnt;
|
|
}
|
|
// Dijkstra
|
|
|
|
// ISAP
|
|
}; |