Driver Program
var n = 5 , m = 4 ; var mat = [ [ 0 , 0 , 1 , 1 ] , [ 0 , 0 , 1 , 0 ] , [ 0 , 1 , 1 , 1 ] , [ 1 , 1 , 1 , 1 ] , [ 0 , 1 , 1 , 1 ] ] ; var q = 2 ; var a = [ 2 , 2 ] ; var binary = [ 1 , 0 ] ; solveQuery ( n , m , mat , q , a , binary ) ;