Creating an vector of pair of total demand and customer number
for ( int i = 0 ; i < n ; i ++ ) { int m = arr [ i ] [ 0 ] , t = arr [ i ] [ 1 ] ; v . push_back ( make_pair ( ( a * m + b * t ) , i + 1 ) ) ; }