728x90 algorithm/brute force8 boj 14500 테트리스 블록 중 'ㅗ'꼴의 블록을 제외하면 dfs를 depth 4까지 한번 진행시 현재 위치에서 상, 하, 좌, 우에 인접된 블록으로 이동했을떄의 모양과 같다. 따라서 depth 4까지 각 위치에 대해 dfs를 진행하고 'ㅗ'꼴의 블록은 따로 배열에 저장을 해 블록을 놓았을 때의 최댓값을 계산하면 된다. github.com/skullkim/algorithm/blob/master/boj/graph/dfs/14500_re.cpp skullkim/algorithm Contribute to skullkim/algorithm development by creating an account on GitHub. github.com 2021. 2. 11. boj 1107 단순히 + 또는 -버튼을 눌렀을때의 횟수를 구하고 그 후 반복문을 돌면서 해당 숫자를 숫자버튼으로 접근할 수 있는지를 검사하고 가능하다면 숫자 버튼을 누른 횟수 + '+' 또는 '-'를 누른 횟수의 합과 현재 최솟값을 비교해 최소 버튼 수를 구하면 된다. github.com/skullkim/algorithm/blob/master/boj/brute_force/1107_re.cpp skullkim/algorithm Contribute to skullkim/algorithm development by creating an account on GitHub. github.com 2021. 2. 10. boj 2309 github.com/skullkim/algorithm/blob/master/boj/brute_force/2309_re.cpp skullkim/algorithm Contribute to skullkim/algorithm development by creating an account on GitHub. github.com 2021. 2. 7. boj 9663 N-Queen 유명한 브루트포스 문제이다. 체스의 퀸이 갈 수 있는 경로 중 수직으로 위, 아래의 경로를 제외하고 모든 경로에 대해 검사를 하면서 경우의 수를 검사하면 된다. github.com/skullkim/algorithm/blob/master/boj/brute_force/9663.cpp skullkim/algorithm Contribute to skullkim/algorithm development by creating an account on GitHub. github.com 2020. 12. 18. 이전 1 2 다음 728x90