Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 482 Bytes

File metadata and controls

7 lines (4 loc) · 482 Bytes

Minimum scalar product

You are given two vectors v1=(x1,x2,...,xn) and v2=(y1,y2,...,yn). The scalar product of these vectors is a single number, calculated as x1y1+x2y2+...+xnyn.

Suppose you are allowed to permute the coordinates of each vector as you wish. Choose two permutations such that the scalar product of your two new vectors is the smallest possible, and output that minimum scalar product.

More deatils: https://code.google.com/codejam/contest/32016/dashboard#s=p0