import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { static Integer dp[]; static int arr[]; public static void main(String[] args) throws Exception, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); dp = new Integer[N + 1]; arr = new int[N + 1]; for(int i = 1..
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int max = 0; int N = scan.nextInt(); int[] array = new int[N]; int[] d = new int[N]; for(int i = 0; i max) ..