宽度优先搜索模板+题目
宽度优先搜索也是搜索手段是之一,它余深度优先搜索类似,从一个起点出发探索所有可能的结果,是用队列实现。#define inf=0x3f3f3f3f;const int maxn=1000;//对节点的定义可以用struct 或者有一个stl pair的用法struct node{ int x; int y;}p,pp;//typedef pair<int...