Problem DescriptionAcmer in HDU-ACM team are ambitious, especially sh, he can spend time in Internet bar doing problems overnight. so far girls want to meet and Orz him. but Orz him is not that easy. you must solve this problem first. the problem is: Give you a sequence of distinct integers, choose numbers as following: first choose the biggest, then smallest, then second biggest, second smallest etc. until all the numbers was chosen. for example, give you 1 2 3 4 5, you showould output 5 1 4 2 3 InputThere are multiple test cases, each case begins with one integer N (1 <= N <= 10000), following N distinct integers. outputOutput a sequence of distinct integers described above. sample Input51 2 3 4 5 Sample Output5 1 4 2 3 Fast-forward application [cpp] # include <iostream> # include <cstdio> # include <cstring> # include <algorithm> using namespace std; int cmp (const void * a, const void * B) {return (* (int *) a-* (int *) B);} int main () {int n, i, num [10005], a [10005]; while (cin> n) {int flag, flag2; flag = n/2; flag2 = n-flag; memset (a, 0, sizeof (a); memset (num, 0, sizeof (num); for (I = 0; I <n; I ++) cin> num [I]; qsort (num, n, sizeof (int), cmp); int k = 0; for (I = n-1; flag2 --; I --) {a [k] = num [I]; k + = 2;} k = 1; for (I = 0; flag --; I ++) {a [k] = num [I]; k + = 2;} cout <a [0]; for (I = 1; I <n; I ++) {cout <"" <a [I];} cout <endl;} return 0 ;}