자바 백준 12865번골드 5https://www.acmicpc.net/problem/12865 문제 보기분류: 다이나믹 프로그래밍, 배낭 문제 코드 풀이import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); // 물품의 수 N과 배낭의 최대 무게 K를 입력 int N = sc.nextInt(); int K = sc.nextInt(); // 물품의 무게와 가치를 저장할 배열 생성 int[] weights = new int[N]; int[] values = new int[N];..