摘要: 注意, qsz 应该是从2开始的 因为用到了^1无向图 #include #include using namespace std; const int maxn = 1e3+50; struct Edge{ int st; int lst; int to; }edge[maxn*5]; int head[maxn]; int qsz; inline v... 阅读全文
posted @ 2018-10-08 14:21 过路人1998 阅读(123) 评论(0) 推荐(0) 编辑
摘要: dfs #include #include using namespace std; const int maxn = 1e5+50; struct Edge{ int lst; int to; }edge[maxn*5]; int head[maxn]; int qsz; inline void add(int u, int v) { edge[qsz]... 阅读全文
posted @ 2018-10-08 13:04 过路人1998 阅读(132) 评论(0) 推荐(0) 编辑