CCF|最大波动|Java|100
import java.util.*;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int[] ints=new int[n];
int m=-1;
for(int i=0;i<n;i++)
{
ints[i]=in.nextInt();
}
for(int i=0;i<n-1;i++)
{
m=Math.abs(ints[i]-ints[i+1])>m?Math.abs(ints[i]-ints[i+1]):m;
}
System.out.println(m);
}
}