写个类,以后到这里找就行。^_^

const int M = 5024;

struct node {
    int to;
    int val;
    int next;
} g[N<<1];

class Graph {
public:
    int head[M], t;

    void init() {
        CL(head, 0XFF); t = 0;
    }

    void add(int u, int v, int w) {
        g[t].to = v; g[t].val = w; g[t].next = head[u];
        head[u] = t++;
    }
} G;

 

 

相关文章:

猜你喜欢
  • 2021-10-12
  • 2021-07-23
  • 2021-08-28
  • 2022-12-23
  • 2021-11-18
  • 2021-04-16
相关资源
相似解决方案