Making a 2D array containing numbers
vector < vector < int > > makeArray ( int n ) { vector < vector < int > > arr ( n , vector < int > ( n , 0 ) ) ; int c = 1 ; for ( int i = 0 ; i < n ; i ++ ) { for ( int j = 0 ; j < n ; j ++ ) { arr [ i ] [ j ] = c ; c ++ ; } } return arr ; }