Driver code
public static void Main ( ) { int [ , ] interval = { { 1 , 4 } , { 4 , 5 } , { 5 , 6 } , { 6 , 7 } , { 3 , 5 } } ; int N = interval . Length ; int Q = 7 ; solve ( interval , N / 2 , Q ) ; } }