Driver code
int main ( ) { int N = 8 , Z = 4 ; int row [ ] = { 4 , 6 } ; int col [ ] = { 3 , 8 } ; int r = sizeof ( row ) / sizeof ( row [ 0 ] ) ; int c = sizeof ( col ) / sizeof ( col [ 0 ] ) ; cout << subgrids ( N , Z , row , col , r , c ) ; return 0 ; }