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