Function to return the count of indices in from the given binary matrix having equal count of set bits in its row and column
int countPosition ( vector < vector < int > > mat ) { int n = mat . size ( ) ; int m = mat [ 0 ] . size ( ) ;