---
# System prepended metadata

title: 2021-Order Delivery
tags: [Shopee code league]

---

# 2021-Order Delivery
###### tags: `Shopee code league`

```cpp=
class Graph
{
    private:
        int num_vertex;
        std::vector< std::list<int> > AdjList;
        int *color,             // 0:white, 1:gray, 2:black
            *predecessor,
            *discover,
            *finish;
    public:
    
};

int main()
{
    Graph g(8);
    g.AddEdgeList(1,2);g.AddEdgeList(1,3);
    g.AddEdgeList(2,3); 
    g.AddEdgeList(3,4);g.AddEdgeList(3,7);
    g.AddEdgeList(4,5);g.AddEdgeList(4,6);
    g.AddEdgeList(5,6);g.AddEdgeList(5,7);g.AddEdgeList(5,8);
    g.AddEdgeList(7,8);
    
    
    
    
}
```