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
- 언리얼
- 게임개발
- 이득우
- 웅진씽크빅
- UI 자동화
- c++
- 시리얼라이제이션
- DFS
- 개발일지
- 유한상태기계
- BFS
- lower_bound
- fsm
- upper_bound
- binary_search
- 운영체제
- unreal
- 안드로이드
- 인프런
- unity
- 재귀
- 너비우선탐색
- 프로그래머스
- 알고리즘
- 유니티
- c#
- 백준
- 게임개발공모전
- 이분탐색
- 구현
Archives
- Today
- Total
목록타겟 넘버 (1)
초고교급 희망
[프로그래머스][C++] 타겟 넘버
#include #include using namespace std; int answer; void dfs(vector& numbers, int target, int sum, int idx) { if(idx == numbers.size()) { if(sum == target) { answer++; } return; } dfs(numbers, target, sum + numbers[idx], idx + 1); dfs(numbers, target, sum - numbers[idx], idx + 1); } int solution(vector numbers, int target) { dfs(numbers, target, 0, 0); return answer; } 저 이거 10분만에 풀었어염 데헷>.
Algorithm/Programmers
2023. 6. 1. 22:17