using System.Collections.Generic;
public static void Main()
private static void task()
int[] h = {1,6,7,8,4,12};
h = h.OrderBy(x=>x).ToArray();
List<Tuple<int,int>> alloc = new List<Tuple<int,int>>();
for(int i=0,j=h.Count()-1;i<j; i++,j--)
alloc.Add(Tuple.Create<int,int>(h[i],h[j]));
private static void print(List<Tuple<int,int>> t)
Console.WriteLine(x.Item1 + " - " + x.Item2 );