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

일반적인 bfs와 비슷한데, 큐에 넣는 정보에 말처럼 이동한 횟수를 저장하는 정보도 같이 넣어서 이미 k번 말처럼 이동했다면 한칸씩만 이동하도록 하고, 방문 검사를 말처럼 이동한 횟수에 따라 다르게 검사하였다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int k, w, h; int dRow[4] = { -1,0,1,0 }; int dCol[4] = { 0,1,0,-1 }; int dRowHorse[8] = { -2,-1,1,2,2,1,-1,-2 }..
알고리즘
2022. 5. 20. 13:06