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

일반적인 백트래킹 문제인데, 중복을 포함하지 않게 하기 위해 string 타입의 set을 이용해서 중복된 숫자는 출력하지 않았다. #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; vector found(8, false); set strs; int n, m; void dp(const vector& v, int cnt, vector &ans) { if (cnt >= m) { string str = ""; for (auto a : ans) { str += to..
알고리즘
2022. 4. 1. 12:57