본문 바로가기

반응형

Algorithm_BOJ(백준)/완전탐색(Brute Force)

(70)
[백준 16236 c++ V] 아기 상어 - 풀이 링크: https://github.com/xhaktmchl/Algorithm_study/blob/main/BOJ/%EC%82%BC%EC%84%B1%20SW%20%EC%97%AD%EB%9F%89%20%ED%85%8C%EC%8A%A4%ED%8A%B8%20%EA%B8%B0%EC%B6%9C%20%EB%AC%B8%EC%A0%9C/BFS/%5B%EB%B0%B1%EC%A4%80%2016236%20c%2B%2B%20V%5D%20%EC%95%84%EA%B8%B0%20%EC%83%81%EC%96%B4.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study developme..
[백준 15686 c++ V] 치킨 배달 - 풀이 링크: https://github.com/xhaktmchl/Algorithm_study/blob/main/BOJ/%EC%82%BC%EC%84%B1%20SW%20%EC%97%AD%EB%9F%89%20%ED%85%8C%EC%8A%A4%ED%8A%B8%20%EA%B8%B0%EC%B6%9C%20%EB%AC%B8%EC%A0%9C/%EC%99%84%EC%A0%84%ED%83%90%EC%83%89/%5B%EB%B0%B1%EC%A4%80%2015686%20c%2B%2B%20V%5D%20%EC%B9%98%ED%82%A8%20%EB%B0%B0%EB%8B%AC.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xh..
[백준 9094 c++ V] 수학적 호기심 - 풀이 원본: https://github.com/xhaktmchl/Algorithm_study/blob/main/BOJ/%EB%B8%8C%EB%A3%A8%ED%8A%B8%ED%8F%AC%EC%8A%A4(Brute_Force)/%5B%EB%B0%B1%EC%A4%80%209094%20c%2B%2B%20V%5D%20%EC%88%98%ED%95%99%EC%A0%81%20%ED%98%B8%EA%B8%B0%EC%8B%AC.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study development by creating an account on GitHub. github.c..
[백준 10971 c++ VO] 외판원 순회 2 https://github.com/xhaktmchl/Algorithm_study/blob/3c46f2ac1efc9be33417bd9bcaf377d4f6fb0ebc/BOJ/%EB%B8%8C%EB%A3%A8%ED%8A%B8%ED%8F%AC%EC%8A%A4(Brute_Force)/%5B%EB%B0%B1%EC%A4%80%2010971%20c%2B%2B%20VO%5D%20%EC%99%B8%ED%8C%90%EC%9B%90%20%EC%88%9C%ED%9A%8C%202.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study development by creating an acc..
[백준 1535 c++ O] 안녕 https://github.com/xhaktmchl/Algorithm_study/blob/58c462ba36ad885930f1146067c98471c043cd03/BOJ/%EB%B8%8C%EB%A3%A8%ED%8A%B8%ED%8F%AC%EC%8A%A4(Brute_Force)/%5B%EB%B0%B1%EC%A4%80%201535%20c%2B%2B%20O%5D%20%EC%95%88%EB%85%95.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study development by creating an account on GitHub. github.com #include ..
[백준 15649 c++ OOO] N과 M (1) 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 #define _CRT_SECURE_NO_WARNINGS #include #include #include using namespace std; /* [백준 15649 c++ OOO] N과 M (1) 접근1: dp[n] = dp[n-1]+dp[n-2]+dp[n-3] -> 이번엔 완전탐색으로 구현 접근2: 완전탐색 -> 재귀dfs -> 재귀중간 순열 체크하면 방문한것 초기화 해야함 시간복잡도: n*(n-1)*...1 가지 경우의 수 = O(n!) 풀이1:..
[백준 10448 c++ O] 유레카 이론 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 #define _CRT_SECURE_NO_WARNINGS #include #include #include using namespace std; /* [백준 10448 c++ O] 유레카 이론 문제: k가 삼각수의 3개의 삼각수의 합으로 표현 되는지 유무 출력 접근: 삼각수의 중복이 허용 -> 모든 수 더하는 완탐 재귀 -> 재귀 종료 시간복잡도: O(44*3) 풀이1: k가 1000 이하이기 때문에 삼각수 최대 n은 44 -> 삼각수 T44까지 저장 완탐 재귀 ..
[백준 9095 c++ OOOO] 1, 2, 3 더하기 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 #define _CRT_SECURE_NO_WARNINGS #include #include #include using namespace std; // [백준 9095 c++ OOOO] 1, 2, 3 더하기 // 문제: 정수를 1,2,3의 합으로 나타내는 방법의 수를 출력 // 접근1: 1,2,3 경우를 나눔 -> dp -> 탑다운 방식: 정수 i 가되는 경우 // 1. i-1 에서 1 더한 것 // 2. i-2에서 2 더한 것 // 3. i-3 에서 3 더한..

반응형