You have to take the largest k numbers from the n numbers given in input and print the minimum number among them which is actually the k-th maximum number among the n numbers. This can be easily done by sorting. It was the giveaway problem of this contest.