Puzzle - There are n animals in the queue to Dr. Dolittle. [Queue Problem]
Doctor plans to go home after receiving k animals, and therefore what the queue will look like at that moment is important for him. Since the doctor works long hours and she can't get distracted like that after all, she asked you to figure it out.
Input
The first line of input data contains two space-separated integers n and k (1≤n≤105, 0≤k≤1014). In the second line are given space-separated integers a1,a2,...,an (1≤ai≤109).
Output
If the doctor will overall carry out less than k examinations, print a single number "-1" (without quotes). Otherwise, print the sequence of numbers — number of animals in the order in which they stand in the queue.
How to solve this?!? Brute force will not work, as the inputs are very big... 😔