It is an interactive problem.
We have an array $$$a$$$ that we don't know (and cannot modify) and we are given an array $$$b$$$ of the same size as $$$a$$$. (length of $$$a$$$ is less then $$$4\ 000$$$).
We need to arrange the elements in the array $$$b$$$ such that the cross product of arrays $$$a$$$ and $$$b$$$ is maximal. ($$$a_1 * b_1 + ... + a_n * b_n$$$ is maximal).
The interaction consist in giving the arary $$$b$$$ and reciveing the corss product with $$$a$$$ every time.
How can we find a rearrangement of array $$$b$$$ that gives the maximal cross product with $$$a$$$, in less than $$$6000$$$ tries?