12515 - Little Brick's Dream   

Description

As you know, Little Brick is a student is NTHU, major in CS,
he often told his friends that he have a dream - Grow Taller.

He said that every time he lines up in a queue,
he cannot see anything since there are always someone taller than him,
and standing in front of him.

He is furious, he hate to stand after people who is taller than him,
so, he define a formula to calculate the confort level of standing in the ith position in a line.
The confort level f(i) is defined as the number of consecutive people standing in front of him, and are shorter than him.

That see if there is a line, and their heights are 150, 170, 180, 160, 165, fron front to end,
then f(1)=0 since there are no anyone standing in front of position 0,
f(2)=1, since 150 < 170,
f(3)=2, since 170 < 180 and 150 < 180,
f(4)=0, and f(5)=1

One day, Little Brick told you that he is waiting in a long line,
looking forward to shaking hand with his favorite idol,
which is your favorite one, too.

You called Little Brick and asked: "Where are you, Little Brick",
and Little Brick replied: "I am at the position where the comfort level is X",
you: "Wait, what the f...", but it was too late, he had already hang up the phone.

Now, inorder to find Little Brick so that you can cut in line to shake hand with your favorite idol,
you need to find where Little Brick may be at.

That is, given you 2 integers N and X,
where N is the number of people in the line,
and X is the comfort level Little Brick at.
Then N distinct numbers Ai,
representing the height of the people standing at the ith position,
from the front to the end,
you need to find all possible position where Little Brick may be at.

ouo.

For example, the sample input:
6 2
3 1 6 2 4 5,
we can calculate the formula of all index,
f(1)=0, f(2)=0, f(3)=2, f(4)=0, f(5)=1, f(6)=2,
and X=2, so Little Brick may be at position 3 or 6.

Input

The first line contains 2 integer N, X,
N is the number of people, and X is the comfort level,
the second line contains N integer Ai, separate by a space,
representing the height of people standint at the ith position.

It is guarantee that,
1<=N,X<=10^7,
1<=Ai<=10^9

 

Output

Output contains one line,
output all possible positions where Little Brick may be at,
separate by a blank.
If there is no possible position where Little Brick may be at,
output a single line "ouo" (without quote).

The index of position start from 1, and you must output the index in increasing order.

Sample Input  Download

Sample Output  Download

Tags




Discuss