This question was asked in Round 1 of Code Jam 2008 contest. The problem 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 …
[Continue reading]
[Continue reading]