package yukicoder045; import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int[] v=new int[n]; int[] dp=new int[n]; for(int i=0;i1)dp[1]=Math.max(v[0],v[1]); for(int i=2;i