백트래킹1 [알고리즘/백준] 14500 테트로미노 - 삼성 SW 역량테스트, 자바(Java) 문제 https://www.acmicpc.net/problem/14500 풀이 코드 ㅜ 를 제외한 나머지 4개 모양은 DFS와 백트래킹을 통해 구한다. ㅜ 모양은 DFS를 통해 구할 수 없기 때문에 추가적으로 구한다.(코드상 checkOShape 메서드) import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; public class Main { static int n, m; static int[][] board; static boolean[][] check; static int answer = Integer.MIN_VALUE; static int[] dx = .. 2021. 10. 18. 이전 1 다음