알고리즘/JAVA (39) 썸네일형 리스트형 [JAVA] 백준 알고리즘 1149 RGB거리 문제 코드 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); int[][] dp = new int[T+1][3]; for(int i=1; i [JAVA] 백준 알고리즘 2293 : 동전 1 (DP) 문제 소스 import java.util.Scanner; public class Main { static int N,K; static int coin[], dp[]; public static void main(String args[]) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); K = sc.nextInt(); coin = new int[N+1]; dp = new int[K+1]; for (int i=1; i [JAVA] 백준 알고리즘 2839 : 설탕 배달 문제 소스 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); Queue q = new LinkedList(); .. [JAVA] 백준 알고리즘 2156 : 포도주 (DP) 문제 소스 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLine()); long[] input = new long[T+1]; for(int i=1; i1) { dp[2] = input[1]+input[2]; } if(.. [JAVA] 백준 알고리즘 1912 : 연속합 (DP) 문제 소스 import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int input[] = new int[N]; int sum[] = new int[N]; for(int i=0; i 이전 1 2 3 4 ··· 8 다음