백준 2156 java
-
boj)2156 - 포도주 시식PS/boj 2020. 9. 19. 16:25
import java.io.*; import java.util.StringTokenizer; public class boj_2156 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static long[] dp; static int[] val; static int n; public static void main(String[] args) throws IOException { n = Integer.parseInt(br.readLine()); dp = new long[n+1]; val = new int[n+1]; for (int i = 1; i = 2) { dp[2] = val[1] + val[2]; } fo..