include
include
include
using namespace std;
define V_NUM 5
bool visited[V_NUM];
int G[V_NUM][V_NUM];
queue
void visite(int v){
printf("%d",v);
}
void G_init() {
G[0][1]=1;
G[0][2]=1;
G[1][0]=1;
G[1][3]=1;
G[2][0]=1;
G[2][3]=1;
G[3][1]=1;
G[3][2]=1;
G[3][4]=1;
G[4][3]=1;
}
void bfs(int v){
visite(v);
visited[v]=true;
Q.push(v);
while(Q.empty()false){
v=Q.front();
Q.pop();
for(int i=0;i<V_NUM;i++){
if(G[v][i]1&&visited[i]==false){
visite(i);visited[i]=true;
Q.push(i);
}
}
}
}
int main() {
bfs(0);
return 0;
}