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 |
Tags
- 그래프 이론
- MySQL
- opencv
- LSTM
- object detection
- Reinforcement Learning
- machine learning
- C++
- Mask Processing
- deep learning
- 딥러닝
- eecs 498
- AlexNet
- CNN
- r-cnn
- two-stage detector
- DP
- Python
- canny edge detection
- MinHeap
- 머신러닝
- dynamic programming
- One-Stage Detector
- image processing
- 강화학습
- 백준
- real-time object detection
- BFS
- YoLO
- dfs
Archives
- Today
- Total
목록2668 (1)
JINWOOJUNG

접근법 어려웠다.. 단순히 dfs 측면으로 접근하고자 했는데 " 1->3->2->3" 과 같이 일치하지 않는 집합을 거름과 동시에 중간에 일치하는 집합을 찾아내는 아이디어를 도출하는게 매우 힘들었다... 정답 import sys sys.setrecursionlimit(10**6) N = int(input()) graph = [[] for _ in range(N+1)] for i in range(1,N+1): graph[int(input())].append(i) visited = [0]*(N+1) result = set() def dfs(i, arr): for j in graph[i]: if visited[j]: while arr: tmp = arr.pop() result.add(tmp) if j == t..
백준
2023. 12. 30. 00:53