-->
当前位置:首页 > 题库

PROGRAMMING:line up

Luz5年前 (2021-05-10)题库474
Zhang Luoyan is a girl who likes dancing. She has also signed up for a special dance class.
When entering the school, the teacher asked everyone to line up according to their height. The students who are small are in the front, and the students who are tall are in the back. The order of equal height is random.
If I give you the height data of these students, can you calculate the first and last row of the program?
###Input format:
The input consists of three lines.
The first line is an integer n (1 < = n < = 30), indicating the number of students in the dance class.
The second line is n integers, representing the height of all students, in centimeters. The data of n students, including Cheng Cheng's own.
The third line is an integer indicating Cheng Cheng's height.
###Output format:
Output only two integers, separated by spaces. They are: the number of front faces, the most advanced position and the last position of the program.
###Input example:
```in
eight
133 134 132 133 131 130 138 133
one hundred and thirty-three
```
###Output example:
```out
4 6
```







answer:If there is no answer, please comment