문제 : https://www.acmicpc.net/problem/11724 graph를 행렬화 시켜서 bfs를 돌려보았더니, 시간이 오래걸리는 것이 느껴졌다.이전, 1260 문제 풀이(http://rhkdrmfh.tistory.com/30) 중 두번째의 방법과 유사하게 풀이하였다. 연결 요소가 N개 존재할 때, BFS 혹은 DFS는 N번 시행되어야한다.for (int i = 1; i > vertex_num >> edge_num; for (int i = 0; i > vertex_left >> vertex_right; graph[vertex_left].push_back(vertex_right); graph[vertex_right].push_back(vertex_l..
알고리즘/(깨짐)
2017. 3. 15. 00:18
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 문자열
- UIView Animation
- Custom Cell
- 객체
- DP
- XAML
- Add TapGesture
- CustomCollectionViewCell
- MVVM
- dfs
- command
- 코딩야학
- Cell Animation
- CollectionView
- 생활코딩
- 백준
- FEED
- listview
- C++
- 타일링
- Grid
- 데이터 바인딩
- 그래프
- BOJ
- BFS
- Fakebook
- 스택
- WPF
- 백준온라인
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함