随笔分类 -  图算法

摘要:题目: A到B地,要有B到A地才行得通分析: 初始化 a[i] = i,然後讀入x,y,交換a[x],a[y]。最後判斷是否a[i]==i#include <set>#include <map>#include <cmath>#include <queue>#include <stack>#include <string>#include <vector>#include <cstdio>#include <cstring>#include <iostream>#includ 阅读全文
posted @ 2012-02-29 22:10 yejinru 阅读(234) 评论(5) 推荐(0) 编辑