Problem Statement | |||||||||||||
Given a set S of points in the plane we can generate a new set T in the following fashion:
You will be given int[]s xs and ys denoting the points contained in S. Point i will have x-coordinate xs[i] and y-coordinate ys[i]. After applying rnds rounds to S, you will return the best point. One point is better than another if it has a larger y-coordinate. In case of a tie, the point with the larger x-coordinate is then better. The returned point should have the form (quotes for clarity) "x y" where x and y denote the x and y coordinates respectively. Each coordinate has the format (quotes for clarity) "####.####". In other words, there should be exactly 4 digits before the decimal place and 4 digits afterward. When necessary, round down to the nearest ten-thousandth. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
| - | xs must contain between 3 and 50 elements inclusive. | ||||||||||||
| - | ys must contain the same number of elements as xs. | ||||||||||||
| - | Each element of xs will be between 0 and 5000 inclusive. | ||||||||||||
| - | Each element of ys will be between 0 and 5000 inclusive. | ||||||||||||
| - | rnds must be between 1 and 10 inclusive. | ||||||||||||
| - | Each given point will be distinct. | ||||||||||||
Examples | |||||||||||||
| 0) | |||||||||||||
| |||||||||||||
| 1) | |||||||||||||
| |||||||||||||
| 2) | |||||||||||||
| |||||||||||||
| 3) | |||||||||||||
| |||||||||||||
| 4) | |||||||||||||
| |||||||||||||