Please help me solve AtCoder Contest 155 Problem D (Pairs).I can't think of any other solution except brute force approach.
We have N integers A1,A2,...,AN
.
There are N(N−1)/2 ways to choose two of them and form a pair. If we compute the product of each of those pairs and sort the results in ascending order, what will be the K-th number in that list?