BFS

· Algorithm
유형 난이도 완료일 링크 특이사항 DFS, BFS 실버2 23/03/28 https://www.acmicpc.net/problem/1260 내 코드 #include #include #include using namespace std; int arr[1001][1001]; int visited[1001]; int visited2[1001]; int n, m, v; int cnt = 0; int cnt2 = 1; void DFS(int start) { cnt++; if(cnt>n) return; cout v1 >> v2; arr[v1][v2]=1; arr[v2][v1]=1; } visited[v]=1; DFS(v); cout
Yannoo
'BFS' 태그의 글 목록