摘要: A题,一个简单的bfs#include#include#include#include#include#define maxn 100009 using namespace std;int vis[maxn];vectorve[maxn];queueq; bool bfs(int s){ int l; vis[s]=1; q.push(s); while(!q.empty()) { int v=q.front(); q.pop(); l=ve[v].size(); for(int i=0; ivis[v]+1... 阅读全文
posted @ 2014-03-09 19:06 Yours1103 阅读(225) 评论(0) 推荐(0) 编辑