@@ -0,0 +1,1025 @@
+import java.util.*;%0Aimport java.math.*;%0Aimport java.io.*;%0A%0Apublic class Main%7B%0A%09//static Scanner in;%0A%09static BufferedReader in;%0A%09static PrintWriter out;%0A%09static StringTokenizer st;%0A%0A%09public static void main(String%5B%5D args) throws IOException%7B%0A%09%09//in = new Scanner(System.in);%0A%09%09in = new BufferedReader(new InputStreamReader(System.in));%0A%09%09out = new PrintWriter(System.out);%0A%0A%09%09st = new StringTokenizer(in.readLine().trim());%0A%0A%09%09int n = Integer.parseInt(st.nextToken());%0A%09%09int c = Integer.parseInt(st.nextToken());%0A%0A%09%09st = new StringTokenizer(in.readLine().trim());%0A%09%09int%5B%5D x = new int%5Bn%5D;%0A%09%09for(int i=0; i%3Cn ; i++)%7B%0A%09%09%09x%5Bi%5D = Integer.parseInt(st.nextToken());%0A%09%09%7D%0A%0A%09%09int maxdiff = 0;%0A%09%09for(int i=1; i%3Cn; i++)%7B%0A%09%09%09maxdiff = Math.max(x%5Bi-1%5D - x%5Bi%5D, maxdiff);%0A%09%09%7D%0A%0A%09%09out.println(Math.max(maxdiff-c,0));%09%09%0A%0A%09%09out.flush();%0A%09%7D%0A%0A%09public static void print(int%5B%5D%5B%5D dp)%7B%0A%09%09for(int i=0;i%3Cdp.length;i++)%7B%0A%09%09%09for(int j=0;j%3Cdp%5Bi%5D.length; j++)%7B%0A%09%09%09%09System.out.print(%22%5B%22+dp%5Bi%5D%5Bj%5D+%22%5D%22);%0A%09%09%09%7DSystem.out.println();%0A%09%09%7D System.out.println();%0A%09%7D%0A%7D%0A

Create 385A.java