2606

알고리즘 문제 풀이/1DP_과제(~180615)

180207_2606_바이러스

//https://www.acmicpc.net/problem/2606 #include #include using namespace std;int N, M, cnt;bool network[101][101];bool visited[101]; void input(){ cin >> N >> M; int a,b; for(int i=0; i> a >> b; network[a][b]=network[b][a]=1; }} void bfs(){ queue q; q.push(1); visited[1]=1; while(!q.empty()){ int now=q.front(); q.pop(); for(int i=2; i

bong sue
'2606' 태그의 글 목록