Var a:array[1..1000] of integer;
i,n,max:integer;
Begin
Write('Nhap n = ');readln(n);
For i:=1 to n do
Begin
Write('Nhap phan tu thu ',i,' = ');readln(a[i]);
End;
max:=a[2] - a[1];
For i:=3 to n do
Begin
If a[i] - a[i-1] > max then max:=a[i]-a[i-1];
End;
Write('Khoang cach lon nhat la ',max);
Readln;
End.