DFS Questions C++

Link to Guide’s Solution: https://usaco.guide/silver/dfs?lang=cpp

  1. The code does vector<int> adj_list[MN];. Then when populating the adjacent matrix they do: adj_list[u].push_back(v). I’m a little confused, adj_list is just a 1D vector right? in here they are accessing an element as if that element is a vector. When they create the vector shouldn’t it be a vector <vector <int> > adj_list?

They’re making an array of vectors, and then accessing each vector with the [] operator and proceeding to push_back the neighbor.