Driver code
int main ( ) { int arr [ N ] [ N ] = { 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 1 } ; int range1a = 2 , range1b = 2 ; int range0a = 2 , range0b = 3 ; int K = 3 , b [ N ] [ N ] = { 0 } ;