Here is the problem statement
http://www.spoj.com/problems/FASHION/
Obviously we will get the maximum answer if we put the bests together, the maximum with the maximum and the minimum with the minimum. Only thing we need is to sort both arrays and start multiplying all the pairs with the same indexes.
http://www.spoj.com/problems/FASHION/
Obviously we will get the maximum answer if we put the bests together, the maximum with the maximum and the minimum with the minimum. Only thing we need is to sort both arrays and start multiplying all the pairs with the same indexes.
No comments:
Post a Comment