2177: 查找插入有序数组的位置

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:79 Solved:1

Description

给你m个已经从小到大排好序的整数,输入一个数x,输出x插入的位置,保证x插入后的m+1数还是有序的。

Input

第一行一个整数m:数的个数 ( 0 <= m <= 100 ) 

第二行m个整数(空格隔开)( 这些数在 0-999999范围内 ) 

第三行为要查找的数n

Output

n的位置

Sample Input Copy

10
9 19 20 23 56 78 90 180 190 230
35

Sample Output Copy

5

Source/Category