Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 너비우선탐색
- 컴퓨터공학과
- OS
- cs
- 스택
- 그래프
- 개발
- 오퍼레이팅시스템
- 브루트포스
- 구현
- 백준
- 자료구조
- Stack
- 정석
- 컴공
- 코테
- 북리뷰
- DP
- 컴공과
- 코딩
- 알고리즘
- Computer science
- 정석학술정보관
- c++
- 문제풀이
- Operating System
- bfs
- 오에스
- coding
- vector
Archives
- Today
- Total
목록StronglyConnectedComponent (1)
Little Jay
[C++] 백준 2150번 - Strongly Connected Component
강연결요소는 DFS를 두번 실행해서 연결된 요소를 찾을 수 있다. stack에 방문한 순서가 아닌 finished 되는 순서로 넣어야하기 때문에 이 점을 주의해서 풀면 될 것이다. 정렬을 빡세게 수행했는데 이렇게까지는 안해도 될 것 같다. #include #include #include #include using namespace std; #define endl '\n' #define vvi vector #define vi vector #define vb vector int n, m; int follower[50001]; void first_dfs(int start, vb& visited, vvi& adj, stack& st) { visited[start] = true; for (auto next : a..
알고리즘/BOJ
2022. 7. 1. 16:49