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

접근법 기본적인 아이디어는 DFS를 생각했고, 여기서 특이점은 R,G를 동일하게 인식해야 한다는 점이다. 따라서 DFS를 적용할 때 B가 아닌 위치를 다른 배열에 체크해 둔 후, 해당 배열에 한번 더 DFS를 적용하여 적록색약인 경우에 구역의 수를 계산 하였다. 정답 import sys sys.setrecursionlimit(10**9) dx = [0,0,-1,1] dy = [-1,1,0,0] N = int(input()) def dfs(x,y,color): image[y][x] = 0 if color != "B": check[y][x] = 1 for i in range(4): X = x + dx[i] Y = y + dy[i] if(0
백준
2023. 12. 28. 15:58