摘要:
很简单的一道广度遍历题目 1 #include <stdio.h> 2 #define up_bound 100000 3 #define down_bound 0 4 int Q[100010],dist[100010]={0}; 5 int vis[100010]={0}; 6 7 int bfs(int n,int k){ 8 int front=0,rear=1; 9 Q[front]=n;10 vis[n]=1;11 while(front<rear){12 int x=Q[front];13 if(x==k)14 ... 阅读全文
posted @ 2011-11-04 21:43
Seiyagoo
阅读(374)
评论(0)
推荐(0)
浙公网安备 33010602011771号