Algorithm_프로그래머스/완전탐색(BF) (2) 썸네일형 리스트형 [프로그래머스 42839 c++ VV] 소수 찾기 - 풀이 링크: https://github.com/xhaktmchl/Algorithm_study/blob/main/Programmers/%EC%99%84%EC%A0%84%ED%83%90%EC%83%89/%5B%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%A8%B8%EC%8A%A4%2042839%20c%2B%2B%20VV%5D%20%EC%86%8C%EC%88%98%20%EC%B0%BE%EA%B8%B0.cpp GitHub - xhaktmchl/Algorithm_study: 알고리즘 이론 및 문제풀이 알고리즘 이론 및 문제풀이. Contribute to xhaktmchl/Algorithm_study development by creating an account on GitHub. gi.. [프로그래머스 c++ V] 단체사진 찍기 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 #include #include #include #include using namespace std; // [프로그래머스 c++ V] 단체사진 찍기 // 문제: 8명의 멤버가 있을 때 문자열로 주어지는 조건에 맞는 순열의 수 구하기 // 접근: 완전탐색: 8명이 줄스는 경우의 수 -> next_permutation() 이용 모든 순열 탐색 // 멤버 사이 거리는 string.find() 함수 이용 // 시간복잡도: O(n*순열의 수) = 100*8! = 약 40.. 이전 1 다음