using System.Collections.Generic;
public static IList<IList<int>> RemoveInterval(int[][] intervals, int[] toBeRemoved) {
var list = new List<IList<int>>();
for (int i = 0; i < intervals.Length; i++)
if (toBeRemoved[0] <= cur[0] && cur[1] <= toBeRemoved[1])
else if (cur[0] >= toBeRemoved[1] || cur[1] <= toBeRemoved[0])
else if (cur[0] < toBeRemoved[0] && toBeRemoved[1] < cur[1])
list.Add(new int[] { cur[0], toBeRemoved[0] });
list.Add(new int[] { toBeRemoved[1], cur[1]});
else if (cur[0] < toBeRemoved[0])
list.Add(new int[] { cur[0], toBeRemoved[0] });
else if (cur[0] < toBeRemoved[1])
list.Add(new int[] { toBeRemoved[1], cur[1] });
public static void ShowListOfList(IList<IList<int>> list)
Console.WriteLine(string.Join(", ", list.Select(x => "[" + string.Join(", ", x) + "]")));
public static void Main()
Console.WriteLine("UniLecs");
ShowListOfList(RemoveInterval(list, new int[] { 1, 6 }));