I have this code:
const int maxnodes = 5000;
struct Edge
{
int to, rev;
int f, cap;
};
vector g[maxnodes];
This is qui
It is a C-array of vectors
Example with maxnodes = 5
.
G[5]
0 -> std::vector
1 -> std::vector
2 -> std::vector
3 -> std::vector
4 -> std::vector
If each element of g
contains 5 elements, it would look like this
G
-
0 -> {0, 1, 2, 3, 4}
1 -> {0, 1, 2, 3, 4}
2 -> {0, 1, 2, 3, 4}
3 -> {0, 1, 2, 3, 4}
4 -> {0, 1, 2, 3, 4}
Meaning, g[u][j]
, for example with g[2][3]
would correspond to the third element in the vector at the second element of g
.
g[2][3]
G
-
0 -> {0, 1, 2, 3, 4}
1 -> {0, 1, 2, 3, 4}
2 -> {0, 1, 2, ***3***, 4}
3 -> {0, 1, 2, 3, 4}
4 -> {0, 1, 2, 3, 4}