Traverse the array
for ( int i = 0 ; i < N ; i ++ ) { if ( order [ i ] % X == 0 ) { vect . Add ( new Tuple < int , int > ( ( order [ i ] / X ) , i + 1 ) ) ; } else { vect . Add ( new Tuple < int , int > ( ( order [ i ] / X + 1 ) , i + 1 ) ) ; } }