#include void Quicksort(int data[], int left, int right){ int l = left, r = right; int pivot = data[(left + right) / 2]; int temp; while(1){ while (data[l] < pivot) l++; while (pivot < data[r]) r--; if(r < l) break; temp = data[l]; data[l] = data[r]; data[r] = temp; l++, r--; } if(left < r) Quicksort(data, left, r); if(l < right) Quicksort(data, l, right); } int main(void){ int i, N, ans = 1000000; scanf("%d", &N); if(N-1){ int x[N+1]; for(i=1;i<=N;i++){ scanf("%d", &x[i]); } Quicksort(x, 1, N); for(i=1;i