import java.util.*; public class minDifference { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n=in.nextInt(); long [] a = new long[n]; for(int counter=0;counter