2133 타일 채우기 (1) 썸네일형 리스트형 JAVA - 백준 알고리즘 - 2133 타일 채우기 https://www.acmicpc.net/problem/2133 이 문제는 DP (동적 계획법) 알고리즘을 사용하면 풀 수 있는 문제이다. 자세한 설명은 주석을 참고하면 된다. dp를 풀때는 아무것도 하지 않는 경우도 경우의 수 1로 본다는 것을 알아두어야겠다. import java.util.Scanner; public class Main { static int[] arr = new int[31]; // dp 값 저장을 위한 배열 static int result; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); // 입력 System.out.print(dp(N)); // 출.. 이전 1 다음