Suppose you have n(n<=50000) 2D vectors pi=(xi,yi) , for each 1<=i<=n find 1<=j<=n what minimize dot(pi,pj) , where dot(pi,pj)=xi*xj+yi*yj ;
n(n<=50000)
pi=(xi,yi)
1<=i<=n
1<=j<=n
minimize dot(pi,pj)
dot(pi,pj)=xi*xj+yi*yj
Is there any solution that can get the correct answer efficiently? UPD:|xi,yi|<=100
|xi,yi|<=100
No one has answered this question yet
Check out similar questions: