About
include<iostream>
include<algorithm>
using namespace std; int main() { int n; cin>>n; if(n==1) { cout<<n; return 0; } int tide[n]; for(int a=0;a<n;a++) { cin>>tide[a]; } sort(tide,tide+n); cout<<tide[(n-1)/2]<<" "<<tide[(n-1)/2+1]; for(int l=(n-1)/2-1,h=(n-1)/2+2;h<n;l--,h++) { cout<<" "<<tide[l]<<" "<<tide[h]; } if(n%2!=0) cout<<" "<<tide[0]; }