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 |
Tags
- VR
- 트리
- 스택
- 알고리즘
- 문자열
- 수학
- 다이나믹 프로그래밍
- 브루트포스
- BFS
- 백준
- 투 포인터
- XR Interaction Toolkit
- 시뮬레이션
- 그리디 알고리즘
- 다익스트라
- 그래프
- 백트래킹
- 유니온 파인드
- 정렬
- c++
- 유니티
- 재귀
- Unreal Engine 5
- 자료구조
- 구현
- 우선순위 큐
- 누적 합
- DFS
- Team Fortress 2
- ue5
Archives
- Today
- Total
목록음식물 피하기 C++ (1)
1일1알

bfs/dfs 방식으로 탐색하면서 가장 큰 뭉쳐있는 쓰레기를 찾는 문제이다. 대각선으로는 못가고, 상하좌우로만 탐색하면 된다. #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int n, m, k; int max_trash = 0; vector trash(100, vector(100, false)); int posR[4] = { -1,0,1,0 }; int posC[4] = { 0,1,0,-1 }; void bfs() { queue q; for (int i = 0; i ..
알고리즘
2021. 12. 11. 15:39