Minimum Scalar Product
Perhaps you should mention that your code takes advantage of the Rearrangement inequality which states
that the scalar product of any permutation of the vectors 
\$ (x_1,x_2,...,x_n) \$ and \$ (y_1,y_2,...,y_n) \$ is minimal if the elements of one vector
are in increasing order and the elements of the other in decreasing order.

I see two possible simplifications: First, instead of reading the second
vector into a temporary vector, sorting it and then reversing it "manually", you can sort in decreasing order by supplying a comparator to the sort:

for (std::size_t y_index = 0; y_index &lt; n; ++y_index) {
    std::cin &gt;&gt; y[y_index];
}
sort(y.begin(),y.end(), std::greater&lt;int&gt;());


Second, the scalar product can be computed with 

#include &lt;numeric&gt;

int product = std::inner_product(x.begin(), x.end(), y.begin(), 0);