문제 : 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
- 객체
- Custom Cell
- CustomCollectionViewCell
- BFS
- 데이터 바인딩
- DP
- Fakebook
- C++
- XAML
- 스택
- 그래프
- command
- Add TapGesture
- Cell Animation
- dfs
- WPF
- MVVM
- Grid
- BOJ
- 백준온라인
- 코딩야학
- FEED
- 문자열
- listview
- UIView Animation
- 생활코딩
- 타일링
- CollectionView
- 백준
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함