Romeo is searching for Juliet, who is located on one of the $$$N (1\leq N\leq 10^5)$$$ points $$$P$$$ located on a line segment at time $$$0$$$. Romeo knows Juliet can move at most a distance $$$1$$$ every minute. Romeo eventually hears Juliet at time $$$d (0\leq d\leq 10^9)$$$ minutes and knows she is between $$$[A, B] (0\leq A\leq B\leq 10^9)$$$. Romeo wants to find the possibilities of where Juliet originally was. Can you help him find the locations that Juliet could have originally been at?
The first line contains $$$N, A, B, d$$$. The next line contains $$$N$$$ space-separated integers $$$P_i (0\leq P_i\leq 10^9)$$$. $$$P$$$ is $$$0$$$-indexed, meaning that the first number on the line is $$$P_0$$$, followed by $$$P_1$$$, and so on...
Output the indices of possible locations Juliet could have been at the start on one space-separated line in ascending order. If there are none, your output should be empty.
10 3 5 14 10 14 17 5 11 13 6 17 10
0 4 7