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
- BFS
- 위상 정렬
- 구현
- JPA
- 우선순위 큐
- 누적 합
- java
- CVE
- Spring
- 문자열
- error
- 그리디
- GCP
- Reversing
- thymeleaf
- OS
- 시뮬레이션
- 스택
- 분할 정복
- 맵
- 이분 탐색
- c++
- 데이크스트라
- 최단 경로
- DP
- dfs
- 재귀
- dynamic debugging
- web
- 백트래킹
Archives
- Today
- Total
목록알고리즘 (1)
hades
[Baekjoon] 2252번: 줄세우기
🥅 문제https://www.acmicpc.net/problem/2252 🔍 설계두 노드 간의 순서가 정해져 있고, 답이 여러가지인 경우에는 아무거나 출력하라는 것에서 전형적인 위상 정렬임은 쉽게 파악할 수 있었다. 다만, 다시 기억시키기 위해 알고리즘 파트에 정리하였다. 👊 풀이#include #include #include #include #include using namespace std;int n, m, a, b;vector degree(32001);vector> graph(32001);void topology_sort() { queue q; for (int i = 1; i > n >> m; for (int i = 0; i > a >> b; degree[b] += 1; graph[a].p..
👊 PS/Algorithm
2024. 9. 23. 20:53